chore(release): 0.3.6 #16
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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| publish: | |
| name: publish | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: Production | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup monorepo | |
| uses: ./.github/actions/setup-monorepo | |
| - name: Write CI env files | |
| uses: ./.github/actions/write-ci-env | |
| - name: Lint workspace | |
| run: pnpm lint | |
| - name: Typecheck workspace | |
| run: pnpm typecheck | |
| - name: Run unit and integration tests | |
| run: pnpm test | |
| - name: Build workspace | |
| run: pnpm build | |
| - name: Build publishable package | |
| run: pnpm release:build-package | |
| - name: Verify scaffold package | |
| run: node scripts/verify-create-package.mjs | |
| - name: Write release notes | |
| run: node scripts/write-release-notes.mjs "${GITHUB_REF_NAME}" "dist/release-notes.md" | |
| - name: Configure npm authentication | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org | |
| - name: Verify npm token | |
| if: env.NPM_TOKEN != '' | |
| env: | |
| NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} | |
| run: npm whoami --registry=https://registry.npmjs.org/ | |
| - name: Use npm trusted publishing | |
| if: env.NPM_TOKEN == '' | |
| run: echo "No NPM_TOKEN configured. Relying on npm trusted publishing via GitHub OIDC." | |
| - name: Publish to npm with token | |
| if: env.NPM_TOKEN != '' | |
| run: npm publish ./dist/create-acme-platform --access public --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} | |
| - name: Publish to npm with trusted publishing | |
| if: env.NPM_TOKEN == '' | |
| run: npm publish ./dist/create-acme-platform --access public | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: dist/release-notes.md |