chore: release v0.9.2 #45
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------- | |
| # Publish to npm when a version tag (v*) is pushed | |
| # ------------------------------------------------------------- | |
| # | |
| # Uses npm Trusted Publishing (OIDC) — no NPM_TOKEN needed. | |
| # Each @node-i3x/* package must have a Trusted Publisher | |
| # configured on npmjs.com → release.yml | |
| name: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| concurrency: | |
| group: publish | |
| cancel-in-progress: false | |
| jobs: | |
| ci: | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/ci.yml | |
| secrets: inherit | |
| publish: | |
| name: Publish to npm | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| id-token: write # OIDC token for npm trusted publishing | |
| contents: write # GitHub release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Upgrade npm for OIDC trusted publishing | |
| run: | | |
| npm install -g npm@latest | |
| npm --version | |
| - name: Configure @sterfive registry | |
| run: | | |
| echo "@sterfive:registry=https://npm-registry.sterfive.fr" >> .npmrc | |
| if [ -n "${{ secrets.NPM_STERFIVE_TOKEN }}" ]; then | |
| echo "//npm-registry.sterfive.fr/:_authToken=${{ secrets.NPM_STERFIVE_TOKEN }}" >> .npmrc | |
| fi | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build all packages | |
| run: npm run build | |
| - name: Publish @node-i3x/core | |
| run: npm publish -w packages/core --access public --provenance | |
| - name: Publish @node-i3x/opcua-connector | |
| run: npm publish -w packages/opcua-connector --access public --provenance | |
| - name: Publish @node-i3x/pseudo-session-connector | |
| run: npm publish -w packages/pseudo-session-connector --access public --provenance | |
| - name: Publish @node-i3x/rest-server | |
| run: npm publish -w packages/rest-server --access public --provenance | |
| - name: Publish @node-i3x/app | |
| run: npm publish -w packages/app --access public --provenance | |
| - name: Publish @node-i3x/demo-embedded | |
| run: npm publish -w packages/demo-embedded --access public --provenance | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION=${GITHUB_REF_NAME} | |
| gh release create "$VERSION" \ | |
| --title "$VERSION" \ | |
| --generate-notes \ | |
| --latest 2>/dev/null || \ | |
| gh release edit "$VERSION" \ | |
| --title "$VERSION" \ | |
| --latest |