ci: add release action (#37) #2
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: release-please | ||
on: | ||
push: | ||
branches: [main] | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
command: manifest | ||
upload: | ||
name: Upload ${{ matrix.member }} for ${{ matrix.os }} | ||
needs: release-please | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ steps.release.outputs['packages/catwalk--release_created'] }} | ||
Check failure on line 23 in .github/workflows/release-please.yml GitHub Actions / release-pleaseInvalid workflow file
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
member: ["catppuccin-catwalk"] | ||
env: | ||
EXECUTABLE: ${{ matrix.member }}${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: "Cache Cargo intermediate products" | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }} | ||
- run: | | ||
cargo build -r --locked -p ${{matrix.member}} | ||
cargo test -r --locked -p ${{matrix.member}} | ||
- name: Upload to release | ||
run: gh release upload "${{ steps.release.outputs['packages/catwalk--release_tag'] }}" "target/release/$EXECUTABLE" |