Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create release binary on version tag #64

Merged
merged 4 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
toolchain:
- stable
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: extractions/setup-just@v1
- run: just install build-ui
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pr-audit.yml
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'
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/release-build.yml
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' )
Loading
Loading