Skip to content

Commit

Permalink
Merge pull request #269 from hashicorp/rn/fix/replace-changesets-pat-…
Browse files Browse the repository at this point in the history
…token

Replace CHANGESETS_PAT with github and give perms
  • Loading branch information
RubenSandwich committed Jul 9, 2024
2 parents 466e143 + 2b4150e commit 864ae14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Canary Release

permissions:
pull-requests: write

on:
workflow_call:
secrets:
CHANGESETS_PAT:
required: true
NPM_TOKEN:
required: true
pull_request:
Expand Down Expand Up @@ -36,7 +37,7 @@ jobs:
- name: Version
run: npx changeset version --snapshot canary
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Canary Packages
id: changesets
Expand All @@ -46,7 +47,7 @@ jobs:
publish: npm run release:canary
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Compute new packages info
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Release

permissions:
pull-requests: write

on:
workflow_call:
secrets:
CHANGESETS_PAT:
required: true
NPM_TOKEN:
required: true
push:
Expand Down Expand Up @@ -37,5 +38,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.CHANGESETS_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 864ae14

Please sign in to comment.