v3.0.0 #41
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: Continuous Delivery | |
| on: | |
| release: | |
| types: [published] | |
| # Required for npm Trusted Publishing (OIDC). Configure the trusted publisher | |
| # on npm: package → Settings → Trusted publishing → GitHub Actions → | |
| # workflow filename: release.yml, then your repo owner and repo name. | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build-package-and-publish-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Ensure npm supports trusted publishing | |
| run: npm install -g npm@latest | |
| - name: Bump version to release | |
| run: sed -i "s/v0.0.0/$RELEASE_VERSION/" ./package.json | |
| env: | |
| RELEASE_VERSION: ${{ github.ref_name }} | |
| - name: Install dependencies required to build package | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Publish package | |
| run: npm publish --access public |