Build and release uplink binaries #173
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and release uplink binaries | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-release: | |
| name: Build release for x86_64-unknown-linux-musl | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| target: x86_64-unknown-linux-musl | |
| - name: Use Cross | |
| shell: bash | |
| run: | | |
| cargo install cross | |
| echo "CARGO=cross" >> $GITHUB_ENV | |
| echo "TARGET_FLAGS=--target x86_64-unknown-linux-musl" >> $GITHUB_ENV | |
| echo "TARGET_DIR=./target/x86_64-unknown-linux-musl" >> $GITHUB_ENV | |
| - name: Build release binary | |
| run: cross build --release ${{ env.TARGET_FLAGS }} | |
| - name: Strip binary | |
| run: strip target/x86_64-unknown-linux-musl/release/uplink | |
| - name: Rename binary | |
| run: mv target/x86_64-unknown-linux-musl/release/uplink uplink-x86_64-unknown-linux-musl | |
| - name: Upload release archive | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: uplink-x86_64-unknown-linux-musl |