From 22d871413f6492a81d0cc39ceaedd2de42ceb915 Mon Sep 17 00:00:00 2001 From: hoshinotsuyoshi Date: Tue, 3 Dec 2024 14:53:08 +0900 Subject: [PATCH] Use GitHub App Token for release workflow in GitHub Actions This change should enable GitHub Actions workflows to run when a pull request is opened by `changesets/action`. - Updated `.github/workflows/release.yml` to use `actions/create-github-app-token` for generating a GitHub App token. --- .github/workflows/release.yml | 10 +++++++++- frontend/.changeset/metal-crabs-destroy.md | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 frontend/.changeset/metal-crabs-destroy.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b49dcb64b..291b7b3a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,11 +28,19 @@ jobs: - uses: ./.github/actions/pnpm-setup with: working-directory: ${{ env.working-directory }} + + - name: Create GitHub App Token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.CI_TRIGGER_APP_ID }} + private-key: ${{ secrets.CI_TRIGGER_APP_PRIVATE_KEY }} + - name: Create Release Pull Request or Publish to npm uses: changesets/action@v1.4.9 with: cwd: ${{ env.working-directory }} publish: pnpm changeset publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/frontend/.changeset/metal-crabs-destroy.md b/frontend/.changeset/metal-crabs-destroy.md new file mode 100644 index 000000000..1a36ee255 --- /dev/null +++ b/frontend/.changeset/metal-crabs-destroy.md @@ -0,0 +1,5 @@ +--- +"@liam-hq/cli": patch +--- + +Use GitHub App Token for release workflow in GitHub Actions