From 2b4150eb42146c23a69c633d8a890d3785669548 Mon Sep 17 00:00:00 2001 From: Ruben Nic Date: Tue, 9 Jul 2024 10:39:59 -0400 Subject: [PATCH] Replace CHANGESETS_PAT with github and give perms --- .github/workflows/canary-release.yml | 9 +++++---- .github/workflows/release.yml | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index 338ed9e8..5677e5a1 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 272f1055..fdbf5a79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,11 @@ name: Release +permissions: + pull-requests: write + on: workflow_call: secrets: - CHANGESETS_PAT: - required: true NPM_TOKEN: required: true push: @@ -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 }}