Skip to content

Commit

Permalink
package archives and add cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopesculian committed Mar 4, 2024
1 parent beec76e commit 1d476da
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,30 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
args: "--release"
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
- name: Publish release artifacts
uses: actions/upload-artifact@v4
with:
name: aqora-${{ matrix.platform.os_name }}
path: "aqora*"
if: github.ref == 'refs/tags/test-release'
# - name: Publish GitHub release
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# files: "aqora*"
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy -- -D warnings
- run: cargo test
Expand Down

0 comments on commit 1d476da

Please sign in to comment.