From 84aebcb9fca46572bf3976b7b89c0f5ecc53cf82 Mon Sep 17 00:00:00 2001 From: inomdzhon Date: Tue, 13 Jan 2026 12:11:23 +0300 Subject: [PATCH] ci(publish): use OIDC for publishing --- .github/workflows/publish.yml | 7 ++++--- .nvmrc | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 771de54..b8fc240 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,9 @@ on: jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read # Recommended for actions/setup-node + id-token: write # Required for OIDC steps: - uses: actions/checkout@v5 with: @@ -17,7 +20,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.nvmrc' cache: 'yarn' always-auth: true registry-url: 'https://registry.npmjs.org' @@ -43,5 +46,3 @@ jobs: - name: Publushing release run: yarn publish --non-interactive - env: - NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..6ac2314 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v24.11.1 \ No newline at end of file