diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index c756ef3..4475864 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -12,6 +12,9 @@ jobs: publish: name: publish runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -31,5 +34,3 @@ jobs: - name: Publish to NPM run: | bash ./bin/publish-npm - env: - NPM_TOKEN: ${{ secrets.POSTGRID_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index f5dbb6f..c3adfe0 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -17,5 +17,3 @@ jobs: - name: Check release environment run: | bash ./bin/check-release-environment - env: - NPM_TOKEN: ${{ secrets.POSTGRID_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index c85fe68..9487e48 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ dist-deno /*.tgz .idea/ .eslintcache - +oidc diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bcd0522..5d02000 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.6.0" + ".": "0.6.1" } diff --git a/.stats.yml b/.stats.yml index 3a2bf15..468c6e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 119 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/postgrid/postgrid-f236b45c85d9a03ce8a4aa4c457928e4e3d71a1f73a7dda26ec1a3f90b4881f3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/postgrid/postgrid-3c7d57bbfb43bd794b71e33005d57e8e05469854cd30340b491df0819d145adc.yml openapi_spec_hash: 3562a11137635f5a513f3c1ae8421fda -config_hash: 4429a41bb9161a59679a1a95b1ec7053 +config_hash: c97dc4db121f63642b688d1ec0923a6d diff --git a/CHANGELOG.md b/CHANGELOG.md index 334fec1..691543a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.6.1 (2026-05-14) + +Full Changelog: [v0.6.0...v0.6.1](https://github.com/postgrid/postgrid-node/compare/v0.6.0...v0.6.1) + +### Chores + +* update SDK settings ([de6da44](https://github.com/postgrid/postgrid-node/commit/de6da449bf818f26da3d68bde705fa9d850c63f3)) + ## 0.6.0 (2026-05-13) Full Changelog: [v0.5.2...v0.6.0](https://github.com/postgrid/postgrid-node/compare/v0.5.2...v0.6.0) diff --git a/bin/check-release-environment b/bin/check-release-environment index e4b6d58..6b43775 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,10 +2,6 @@ errors=() -if [ -z "${NPM_TOKEN}" ]; then - errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") -fi - lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/bin/publish-npm b/bin/publish-npm index a609989..4e094d7 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -2,7 +2,12 @@ set -eux -npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN" +if [[ ${NPM_TOKEN:-} ]]; then + npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN" +elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then + echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission" + exit 1 +fi pnpm build cd dist @@ -57,5 +62,8 @@ else TAG="latest" fi +# Install OIDC compatible npm version +npm install --prefix ../oidc/ npm@11.6.2 + # Publish with the appropriate tag -pnpm publish --no-git-checks --tag "$TAG" +pnpm publish --npm-path "$(cd ../ && pwd)/oidc/node_modules/.bin/npm" --no-git-checks --tag "$TAG" diff --git a/package.json b/package.json index 285d693..f2c15f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postgrid-node", - "version": "0.6.0", + "version": "0.6.1", "description": "The official TypeScript library for the PostGrid API", "author": "PostGrid ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 30c2817..3998d8e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.6.0'; // x-release-please-version +export const VERSION = '0.6.1'; // x-release-please-version