diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48b2bb4..1620394 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,11 @@ name: Release & Publish to NPM on: workflow_dispatch +# See https://docs.npmjs.com/trusted-publishers +permissions: + id-token: write # Required for OIDC + contents: read + jobs: release: runs-on: ubuntu-latest @@ -9,16 +14,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.RELEASE_GITHUB_TOKEN }} - name: Setup uses: ./.github/actions/setup - - name: Initialise the NPM config - run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Initialize Git user run: | git config --global user.email "dev@contentpass.de" @@ -29,6 +28,3 @@ jobs: - name: Run release run: npm run release --ci - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }}