Skip to content

Commit

Permalink
ci(github): add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tofuuudon committed Oct 21, 2024
1 parent e1b4573 commit a2de19a
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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:
runs-on: ubuntu-latest
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 }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cargo build
run: |
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-apple-darwin
# - name: Upload release artifacts
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release upload ${{ env.TAG_NAME }} ./target/some-build-artifact.zip

0 comments on commit a2de19a

Please sign in to comment.