Skip to content

ci(github): add release workflow #4

ci(github): add release workflow

ci(github): add release workflow #4

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: rust
upload:
name: Build and upload ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
needs: release-please
if: ${{ needs.release-please.outputs.releases_created == 'false' }}
env:
TAG_NAME: ${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}.${{ needs.release-please.outputs.patch }}
strategy:
matrix:
platform:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest-large
target: x86_64-apple-darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rustup target
run: rustup target add ${{ matrix.platform.target }}
- name: Cargo build
run: cargo build --release --target ${{ matrix.platform.target }}
# - name: Upload release artifacts
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release upload ${{ env.TAG_NAME }} ./target/some-build-artifact.zip