Skip to content

Commit

Permalink
feat: ✨ release
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrnoch committed May 19, 2023
1 parent 0045353 commit 3ce6bfe
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,40 @@ on:

jobs:
release:
name: πŸš€ Release ${{ matrix.target }}
runs-on: ubuntu-latest
name: πŸš€ Release ${{ matrix.target }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
- os: windows-latest
target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
archive: tar.gz
- target: x86_64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
archive: zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master

- name: πŸ“₯ Compiling
run: cargo build --release --target ${{ matrix.target }}
env:
CARGO_TARGET_DIR: target/${{ matrix.target }}

- name: πŸ“¦ Create Archive
run: |
cd $CARGO_TARGET_DIR/release
if [[ "${{ matrix.archive }}" == "zip" ]]; then
zip -r ${{ matrix.target }}.zip *
else
tar czvf ${{ matrix.target }}.tar.gz *
fi
- name: πŸ“€ Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.target }}.${{ matrix.archive }}

0 comments on commit 3ce6bfe

Please sign in to comment.