Skip to content

Commit

Permalink
refactor(ci): to use github application for pat (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeekens authored Sep 28, 2023
1 parent 3e26194 commit a4de02c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ jobs:
runs-on: ubuntu-latest

steps:
# Get GitHub token via the CT Changesets App
- name: Generate GitHub token (via CT Changesets App)
id: generate_github_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}

- name: Checkout
uses: actions/checkout@v2
with:
# Pass a personal access token (using our `ct-release-bot` account) to be able to trigger
# other workflows
# Pass a personal access token (using our CT Changesets App) to be able to trigger other workflows
# https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
token: ${{ steps.generate_github_token.outputs.token }}

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

0 comments on commit a4de02c

Please sign in to comment.