diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index d13b4d1..58659a4 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,6 +4,12 @@ on: push: branches: - main + tags: + - 'v*' + +permissions: + id-token: write # Required for OIDC + contents: read jobs: npm-publish: @@ -11,12 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v4 with: - node-version: 20 + node-version: '20' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: yarn @@ -28,11 +35,8 @@ jobs: run: yarn build - name: Publish if version has been updated - uses: pascalgn/npm-publish-action@1.3.9 + run: yarn npm publish --access public with: tag_name: 'v%s' tag_message: 'v%s' commit_pattern: "Release (\\S+)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically generated - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index da67c9c..3a7c3cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lambda-essentials-ts", - "version": "7.0.2", + "version": "7.0.3", "description": "A selection of the finest modules supporting authorization, API routing, error handling, logging and sending HTTP requests.", "main": "lib/index.js", "private": false,