From 229e77172c122a858fb8116d77fbf0c1c652fa50 Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Tue, 22 Aug 2023 16:07:38 -0700 Subject: [PATCH] Use the Primer GitHub App for auth instead of the GPR_AUTH_TOKEN_SHARED (#2512) --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b06bb486c2..abe406c24b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,15 @@ jobs: - name: Install dependencies run: npm ci + - id: get-access-token + uses: camertron/github-app-installation-auth-action@v1 + with: + app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID }} + private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY }} + client-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_CLIENT_ID }} + client-secret: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_CLIENT_SECRET }} + installation-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_INSTALLATION_ID }} + - name: Create release pull request or publish to npm id: changesets uses: changesets/action@master @@ -35,5 +44,5 @@ jobs: # This expects you to have a script called release which does a build for your packages and calls changeset publish publish: npm run release env: - GITHUB_TOKEN: ${{ secrets.GPR_AUTH_TOKEN_SHARED }} + GITHUB_TOKEN: ${{ steps.get-access-token.outputs.access-token }} NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}