-
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 #12 from fpco/release-artifacts
Github action for release artifacts
- Loading branch information
Showing
3 changed files
with
104 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_RETRY: 10 | ||
RUST_BACKTRACE: short | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
jobs: | ||
checks: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
toolchain: | ||
- 1.71.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: extractions/setup-just@v1 | ||
with: | ||
just-version: 1.10.0 | ||
- uses: cargo-bins/cargo-binstall@main | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-${{ matrix.toolchain }} | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- name: Install musl tools | ||
run: | | ||
sudo apt-get install -y musl-tools | ||
rustup target add x86_64-unknown-linux-musl | ||
cargo binstall cross --no-confirm | ||
- name: Build Musl binary | ||
run: just build-release-binary | ||
- name: Build other binaryies | ||
run: just binaries true | ||
- name: Generate artifacts | ||
run: just cp-binaries | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: artifacts/* | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: artifacts/* | ||
generate_release_notes: true |
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