Skip to content

Commit a4de02c

Browse files
authored
refactor(ci): to use github application for pat (#1887)
1 parent 3e26194 commit a4de02c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
# Get GitHub token via the CT Changesets App
14+
- name: Generate GitHub token (via CT Changesets App)
15+
id: generate_github_token
16+
uses: tibdex/[email protected]
17+
with:
18+
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
19+
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}
20+
1321
- name: Checkout
1422
uses: actions/checkout@v2
1523
with:
16-
# Pass a personal access token (using our `ct-release-bot` account) to be able to trigger
17-
# other workflows
24+
# Pass a personal access token (using our CT Changesets App) to be able to trigger other workflows
1825
# https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
1926
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
20-
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
27+
token: ${{ steps.generate_github_token.outputs.token }}
2128

2229
- name: Read .nvmrc
2330
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
@@ -62,4 +69,4 @@ jobs:
6269
version: yarn changeset:version-and-format
6370
commit: 'ci(changesets): version packages'
6471
env:
65-
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
72+
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}

0 commit comments

Comments
 (0)