From 5015230b249c8782c6d2fbc71bb97f958854f1eb Mon Sep 17 00:00:00 2001 From: David Koblas Date: Wed, 15 Oct 2025 03:33:44 -0400 Subject: [PATCH] fix: npmjs authentication --- .github/workflows/pull_request.yaml | 4 +--- .github/workflows/release.yaml | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index b6eb4df..65baf13 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [22.x] + node-version: [lts/*] steps: - uses: actions/checkout@v4 @@ -35,5 +35,3 @@ jobs: - run: npm test env: CI: true - # - name: Publish to npm - # uses: pascalgn/npm-publish-action@1.2.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 553b1e7..acca75d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,9 +1,5 @@ name: Release -permissions: - id-token: write # Required for OIDC - contents: write - on: #push: # branches: @@ -22,7 +18,11 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.version.outputs.test }} - + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance steps: - name: Checkout uses: actions/checkout@v4 @@ -32,7 +32,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 22 + node-version: lts/* - name: Install dependencies run: npm ci - name: Install semantic-release extra plugins @@ -47,7 +47,7 @@ jobs: id: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + # NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} run: | npx semantic-release echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT diff --git a/package.json b/package.json index d7df774..730dcaa 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/koblas/stdnum-js.git" + "url": "git+https://github.com/koblas/stdnum-js.git" }, "license": "MIT", "devDependencies": {