Zip release artifact and serialize in one job #262
Workflow file for this run
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
name: Rust Build | |
on: | |
push: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache rust target files | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} | |
save-always: true | |
- name: Install sass | |
run: sudo npm install -g sass | |
- name: Check | |
run: cargo check --verbose --all-targets --locked | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Clippy | |
run: cargo clippy --verbose --no-deps --all-targets --locked | |
- name: Build | |
run: cargo build --bin=server --release --locked --verbose | |
- name: Zip archive | |
run: tar -cvzf kachiclash.tar.gz target/release/server public | |
- name: GH Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: kachiclash.tar.gz | |
generate_release_notes: true | |
fail_on_unmatched_files: true |