Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenstaro/upx-action
Strips and runs upx on binaries
https://github.com/svenstaro/upx-action
action actions executables github-actions upx
Last synced: about 2 months ago
JSON representation
Strips and runs upx on binaries
- Host: GitHub
- URL: https://github.com/svenstaro/upx-action
- Owner: svenstaro
- License: mit
- Created: 2019-08-31T14:04:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T13:17:00.000Z (10 months ago)
- Last Synced: 2024-10-29T20:19:43.474Z (about 2 months ago)
- Topics: action, actions, executables, github-actions, upx
- Language: JavaScript
- Size: 52.3 MB
- Stars: 37
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Strip and run UPX on executables [![GitHub Actions Workflow](https://github.com/svenstaro/upx-action/actions/workflows/ci.yml/badge.svg)](https://github.com/svenstaro/upx-action/actions/workflows/ci.yml)
This action allows you to select an executable file which is then stripped and run through [upx](https://upx.github.io/) which drastically decreases the size of those executables.
It runs on all operating systems types offered by GitHub.## Input variables
* `files`: Newline-delimited list of path globs for files to compress. It's compressed in-place. If on Windows, provide Unix style paths (`c:/something`). *either files or file required*
* `file`: The file you want to compress. It's compressed in-place. *Deprecated, prefer `files`*.
* `args`: Arguments to pass to UPX. *optional*
* `strip`: Whether or not "strip" symbols from object file (default `true`). *optional*
* `strip_args`: Arguments to pass to strip. *optional*## Usage
This Action is meant to be ran on just-compiled executables in the same CI job.
Simple example:
```yaml
name: Publishon:
push:
tags:
- '*'jobs:
build:
name: Publish binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release --locked
- name: Compress binaries
uses: svenstaro/upx-action@v2
with:
files: |
target/release/mything
target/release/*
```Complex example with more operating systems and inputs:
```yaml
name: Publishon:
push:
tags:
- '*'jobs:
build:
name: Publish binaries for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
files: |
target/release/mything
args: --best --lzma
strip: true
- os: windows-latest
files: |
target/release/mything.exe
args: -9
strip: false
- os: macos-latest
files: |
target/release/mything
args: --best
strip: true
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release --locked
- name: Compress binaries
uses: svenstaro/upx-action@v2
with:
files: |
${{ matrix.file }}
args: ${{ matrix.args }}
strip: ${{ matrix.strip }}
```## Releasing and publishing
To release this Action:
- Bump version in `package.json`
- Create `CHANGELOG.md` entry
- `npm update`
- `npm run all`
- `git commit -am `
- `git tag -sm `
- `git push --follow-tags`
- Go to https://github.com/svenstaro/upx-action/releases and publish the new version