diff --git a/workflows/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from workflows/ci.yml rename to .github/workflows/ci.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ca301c6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish to NPM + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + + - run: npm ci + - run: npm run build + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 0000000..3a1a567 --- /dev/null +++ b/.release-it.json @@ -0,0 +1,12 @@ +{ + "npm": { + "publish": false + }, + "github": { + "release": true + }, + "git": { + "commitMessage": "chore: release v${version}", + "tagName": "v${version}" + } +} diff --git a/package.json b/package.json index fdba600..0245b5b 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "docker:logs": "docker compose logs -f n8n", "lint": "n8n-node lint", "lint:fix": "n8n-node lint --fix", - "release": "release-it", - "prepublishOnly": "n8n-node prerelease" + "release": "release-it" }, "files": [ "dist"