diff --git a/.github/workflows/npmjs.yml b/.github/workflows/npmjs.yml index 7dee787..8099e88 100644 --- a/.github/workflows/npmjs.yml +++ b/.github/workflows/npmjs.yml @@ -3,10 +3,15 @@ name: Publish Package on: push: tags: - - 'v*' + # `release-it` (via `n8n-node release`) creates bare version tags, e.g. 0.5.0. + # The `v`-prefixed pattern is kept for manually created tags. + - '[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+' + # Allows publishing the current commit without pushing a tag. + workflow_dispatch: permissions: - id-token: write # Required for OIDC + id-token: write # Required for OIDC provenance attestation contents: read jobs: @@ -20,10 +25,17 @@ jobs: node-version: '20' registry-url: 'https://registry.npmjs.org' - # Ensure npm 11.5.1 or later is installed + # Provenance requires npm 11.5.1 or later. - name: Update npm run: npm install -g npm@latest + - run: npm ci - - run: npm run build --if-present - - run: npm test - - run: npm publish --provenance + + - run: npm run build + + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # `prepublishOnly` runs `n8n-node prerelease`, which aborts `npm publish` + # unless RELEASE_MODE is set. + RELEASE_MODE: true diff --git a/package.json b/package.json index 86c1407..390a4e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-nodes-formidable-forms", - "version": "0.4.0", + "version": "0.4.1", "description": "Listen to the request from Formidable Forms", "license": "MIT", "homepage": "https://github.com/Strategy11/n8n-nodes-formidable-forms",