-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
154 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
on: | ||
release: | ||
types: [created] | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
release: | ||
name: release ${{ matrix.target }} | ||
runs-on: ${{ matrix.os }} | ||
if: github.event_name == 'release' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: x86_64-unknown-linux-gnu | ||
archive: tar.gz | ||
os: ubuntu-latest | ||
bin: rsvenv | ||
name: rsvenv-x86_64-unknown-linux-gnu.tar.gz | ||
- target: aarch64-apple-darwin | ||
archive: zip | ||
os: macos-latest | ||
bin: rsvenv | ||
name: rsvenv-aarch64-apple-darwin.tar.gz | ||
- target: x86_64-apple-darwin | ||
archive: zip | ||
os: macos-latest | ||
bin: rsvenv | ||
name: rsvenv-x86_64-apple-darwin.tar.gz | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@4 | ||
- name: Install musl-tools on Linux | ||
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | ||
if: contains(matrix.os, 'ubuntu') | ||
- name: Build binary | ||
shell: bash | ||
run: | | ||
rustup target add ${{ matrix.target }} | ||
cargo build --release --target ${{ matrix.target }} | ||
if: ${{ !contains(matrix.os, 'windows') }} | ||
- name: Strip binary | ||
shell: bash | ||
run: | | ||
strip target/${{ matrix.target }}/release/${{ matrix.bin }} | ||
- name: Package as archive | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../${{ matrix.name }} ${{ matrix.bin }} | ||
cd - | ||
- name: Publish release artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rsvenv-${{ matrix.target }} | ||
path: "rsvenv*" | ||
if: github.ref == 'refs/tags/test-release' | ||
- name: Publish GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: "rsvenv*" | ||
body_path: Changes.md | ||
if: startsWith( github.ref, 'refs/tags/v' ) | ||
|
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
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
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