Skip to content

Commit

Permalink
Merge pull request #50 from MGlolenstine/archive_build_artifacts
Browse files Browse the repository at this point in the history
Archive Unix executables to retain executable flag.
  • Loading branch information
ethteck authored Jan 8, 2024
2 parents 894603d + bbc0b10 commit 4fc59ec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ jobs:
targets: ${{ matrix.target }}
- name: Cargo build
run: cargo build --release --all-features --target ${{ matrix.target }} --bin ${{ env.CARGO_BIN_NAME }}
- name: Package unix artifacts
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
run: |
zip -j -r ${{ env.CARGO_TARGET_DIR }}/${{ env.CARGO_BIN_NAME }}.zip ${{ env.CARGO_TARGET_DIR }}/release/${{ env.CARGO_BIN_NAME }} || true
zip -j -r ${{ env.CARGO_TARGET_DIR }}/${{ env.CARGO_BIN_NAME }}.zip ${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/${{ env.CARGO_BIN_NAME }} || true
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: |
${{ env.CARGO_TARGET_DIR }}/release/${{ env.CARGO_BIN_NAME }}
${{ env.CARGO_TARGET_DIR }}/${{ env.CARGO_BIN_NAME }}.zip
${{ env.CARGO_TARGET_DIR }}/release/${{ env.CARGO_BIN_NAME }}.exe
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/${{ env.CARGO_BIN_NAME }}
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/${{ env.CARGO_BIN_NAME }}.exe
if-no-files-found: error

Expand All @@ -98,4 +102,4 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
files: out/*
files: out/*

0 comments on commit 4fc59ec

Please sign in to comment.