From 5c0e32375620a50828d2483bdd5a2c3c5e27a1d0 Mon Sep 17 00:00:00 2001 From: eran-frontegg Date: Mon, 30 Oct 2023 16:54:24 +0200 Subject: [PATCH] fix(ci): replace token usage --- .github/workflows/publish.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ea074b1..12fb209 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,9 +5,14 @@ on: branches: [ master, next ] env: - GH_TOKEN: ${{ secrets.GH_ADMIN_REPO_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} +permissions: + contents: write + issues: write + pull-requests: write + jobs: publish: name: Publish @@ -15,13 +20,13 @@ jobs: steps: - uses: actions/checkout@v3 with: - token: ${{ secrets.GH_ADMIN_REPO_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Set git config run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.event.pusher.email }}" env: - GITHUB_TOKEN: ${{ secrets.GH_ADMIN_REPO_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Use Node.js 18 uses: actions/setup-node@v3 with: