test release #15
Workflow file for this run
This file contains 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 Binaries | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# based off of https://github.com/houseabsolute/soldr/blob/master/.github/workflows/ci.yml | |
artifacts: | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
platform: | |
- target: x86_64-unknown-linux-musl | |
- target: x86_64-unknown-linux-gnu | |
name: ${{ matrix.platform.target }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- uses: extractions/setup-just@v1 | |
- name: Install musl-tools on Linux | |
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | |
if: matrix.platform.target == 'x86_64-unknown-linux-musl' | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform.target }} | |
- name: Build UI | |
shell: bash | |
run: | | |
just install build-ui | |
cargo build --bin soldr-ui --locked --release --target ${{ matrix.platform.target }} | |
- name: Build proxy | |
shell: bash | |
run: | | |
cargo build --bin soldr --locked --release --target ${{ matrix.platform.target }} | |
- name: Strip binaries | |
shell: bash | |
run: | | |
strip target/${{ matrix.platform.target }}/release/soldr{,-ui} | |
- name: Package as archive | |
shell: bash | |
run: | | |
cd target/${{ matrix.platform.target }}/release | |
tar czvf ../../../${{ matrix.platform.target }}.tar.gz soldr{,-ui} | |
cd - | |
- name: Publish release artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: soldr-${{ matrix.platform.target }} | |
path: ${{ matrix.platform.target }}.tar.gz | |
if: startsWith( github.ref, 'refs/tags/v' ) | |
- name: Publish GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: ${{ matrix.platform.target }}.tar.gz | |
if: startsWith( github.ref, 'refs/tags/v' ) |