3D engine that AI agents drive
Publish version changes through GitHub Actions OIDC
Nguyen Xuan An77de26e76abb
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlnew file mode 100644index 00000000..3d2bd26e--- /dev/null+++ b/.github/workflows/publish.yml@@ -0,0 +1,42 @@+name: Publish 67js++on:+ workflow_dispatch:+ push:+ branches: [main]+ paths: [package.json]++permissions:+ contents: read+ id-token: write++concurrency:+ group: npm-release+ cancel-in-progress: false++jobs:+ publish:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6+ - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6+ with:+ node-version: '24'+ registry-url: https://registry.npmjs.org+ package-manager-cache: false+ - run: npm install --global [email protected]+ - run: npm ci --ignore-scripts+ - run: npm test+ - run: npm run prepare:release+ - run: npm run smoke:package+ - name: Publish a new version through OIDC+ shell: bash+ run: |+ package_name=$(node -p "require('./package.json').name")+ package_version=$(node -p "require('./package.json').version")+ published_version=$(npm view "$package_name@$package_version" version --json 2>/dev/null || true)+ if [ "$published_version" = "\"$package_version\"" ]; then+ echo "$package_name@$package_version is already published."+ else+ npm publish --access public+ fi