chore: release 0.1.1-gh #10
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 | |
id: release | |
with: | |
command: manifest | |
if: ${{ !env.ACT }} | |
outputs: | |
catwalk_release: ${{ steps.release.outputs['packages/catwalk--release_created'] || env.ACT }} | |
catwalk_tag: ${{ steps.release.outputs['packages/catwalk--tag_name'] }} | |
upload-catwalk: | |
name: Upload Catwalk for ${{ matrix.os }} | |
needs: release-please | |
runs-on: ${{ matrix.os }} | |
if: ${{ needs.release-please.outputs.catwalk_release }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
env: | |
MEMBER: catppuccin-catwalk | |
EXECUTABLE: catwalk | |
EXE_SUFFIX: ${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }} | |
- name: Build | |
id: build | |
run: | | |
cargo build --release --locked -p ${MEMBER} | |
cargo test --release --locked -p ${MEMBER} | |
export BINARY_NAME="${EXECUTABLE}-$(rustc --version --verbose | grep host | cut -d ' ' -f 2)" | |
mv "target/release/${EXECUTABLE}${EXE_SUFFIX}" "./${BINARY_NAME}" | |
echo "::set-output name=binary::${BINARY_NAME}" | |
- name: Upload to release | |
run: gh release upload "${{ needs.release-please.outputs.catwalk_tag }}" ${{ steps.build.outputs.binary }} | |
if: ${{ !env.ACT }} | |
- name: Upload to artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{steps.build.outputs.binary}} | |
path: ${{steps.build.outputs.binary}} | |
if: ${{ env.ACT }} |