Skip to content

Commit

Permalink
ci: add release action (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston authored Oct 27, 2023
1 parent fcd9ff7 commit bcf5355
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: release-please

on:
push:
branches: [main]
Expand All @@ -6,12 +8,39 @@ permissions:
contents: write
pull-requests: write

name: release-please

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'] }}
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"

0 comments on commit bcf5355

Please sign in to comment.