diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..031e6b1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24.x + registry-url: https://registry.npmjs.org + package-manager-cache: false + + - run: npm ci + + - name: Verify release version + run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") + test "$GITHUB_REF_NAME" = "v$PACKAGE_VERSION" + + - run: npm run build + - run: npm test + - run: npm publish diff --git a/CHANGELOG.md b/CHANGELOG.md index 9346da2..5cf376a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## v0.12.0 / 2026-07-18 ### Added - support ESM #44 +- Set up GitHub release action / provenance #46 ### Fixed - Fix uploading coverage to coveralls #52