diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f096621 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish Package + +on: + push: + tags: + - 'v*' + +permissions: + id-token: write + contents: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm test + - run: npm publish --provenance --access public + - uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/package.json b/package.json index 1558f75..c06510a 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "pretest": "npm run build", "test": "jest", "version": "echo \"export const Version = '$npm_package_version'\" > src/version.ts && git add src/version.ts && npm run build", - "prepublishOnly": "npm run build", - "postpublish": "npm publish --ignore-scripts --@planetscale:registry='https://npm.pkg.github.com'" + "prepublishOnly": "npm run build" }, "repository": { "type": "git",