-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from hjr3/release-builds
Create release binary on version tag
- Loading branch information
Showing
8 changed files
with
173 additions
and
218 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Pull Request Security Audit | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
pull_request: | ||
paths: | ||
- '**/Cargo.toml' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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' ) |
Oops, something went wrong.