From 3c55f3da653cab8338062e17a42d0a060c1e440f Mon Sep 17 00:00:00 2001 From: Chawye Hsu Date: Fri, 21 Jul 2023 17:30:38 +0800 Subject: [PATCH] chore(ci): update cicd Signed-off-by: Chawye Hsu --- .github/workflows/cicd.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2db3f47..20ce2de 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -5,6 +5,9 @@ on: push: branches: - main +permissions: + contents: write + pull-requests: write jobs: # Check code format check_cargo_fmt: @@ -25,13 +28,14 @@ jobs: name: Release Please needs: check_cargo_fmt runs-on: ubuntu-latest - if: github.repository == 'chawyehsu/hok' && github.ref == 'refs/heads/main' && github.event_name == 'push' && contains(toJSON(github.event.commits.*.message), 'chore(release)') + if: github.repository == 'chawyehsu/hok' && github.ref == 'refs/heads/main' && github.event_name == 'push' steps: - uses: google-github-actions/release-please-action@v3 id: release with: token: ${{ secrets.GITHUB_TOKEN }} release-type: rust + path: crates/hok outputs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }}