diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index ccaff9e92..61aefedd1 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -6,11 +6,6 @@ on: merge_group: types: [checks_requested] -env: - GH_TOKEN: ${{ secrets.FRONTEND_GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true - jobs: build: runs-on: ubuntu-latest @@ -51,6 +46,7 @@ jobs: name: Canary permissions: contents: read + pull-requests: write id-token: write needs: build steps: @@ -78,3 +74,7 @@ jobs: - name: Create Canary Release run: yarn auto canary + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 00cdf730a..3b7396c93 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,23 +4,19 @@ on: branches: - 'master' -env: - GITHUB_TOKEN: ${{ secrets.FRONTEND_GH_TOKEN }} - GH_TOKEN: ${{ secrets.FRONTEND_GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true - jobs: build: runs-on: ubuntu-latest name: Build + permissions: + contents: read + pull-requests: read if: "!contains(github.event.head_commit.message, 'skip-release')" outputs: version_bumped: ${{ steps.version-check.outputs.version_bumped }} steps: - uses: actions/checkout@v6 with: - token: ${{ secrets.FRONTEND_GH_TOKEN }} fetch-depth: 0 fetch-tags: true @@ -37,6 +33,8 @@ jobs: - name: Apply semver updates (if any) id: version-check + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | AUTO_VERSION=$(yarn auto version) EXIT_CODE=$? @@ -70,7 +68,9 @@ jobs: runs-on: ubuntu-latest name: Publish permissions: - contents: read + contents: write + pull-requests: write + issues: write id-token: write needs: build if: needs.build.outputs.version_bumped == 'true' @@ -78,7 +78,6 @@ jobs: steps: - uses: actions/checkout@v6 with: - token: ${{ secrets.FRONTEND_GH_TOKEN }} fetch-depth: 0 fetch-tags: true @@ -101,3 +100,7 @@ jobs: - name: Create Release run: yarn auto shipit + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true