From 0bca68d696670402dff15f969600920df1ef7246 Mon Sep 17 00:00:00 2001 From: Al Mahdi <68297852+almahdi404@users.noreply.github.com> Date: Sun, 8 Sep 2024 00:53:11 +0600 Subject: [PATCH] cd: use permissions instead of PAT --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec5b7b4..21d09ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,11 @@ on: branches: - main +permissions: + id-token: write + contents: write + pull-requests: write + concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: @@ -15,7 +20,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 with: - token: ${{ secrets.PAT }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node.js 20 uses: actions/setup-node@v3 @@ -30,5 +35,5 @@ jobs: with: publish: npm run release env: - GITHUB_TOKEN: ${{ secrets.PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}