fix: pipeline #3
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: NPM Publish | |
| # --------------------------------------------------------------- | |
| # TESTING: trigger on every push so you can verify the pipeline. | |
| # Once verified, comment out the "push" block and uncomment the | |
| # "workflow_dispatch" block below. | |
| # --------------------------------------------------------------- | |
| on: | |
| push: | |
| # on: | |
| # workflow_dispatch: | |
| # inputs: | |
| # version: | |
| # description: Required on main branch (e.g. 1.2.3) | |
| # required: false | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| publish: | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'yarn' | |
| registry-url: 'https://registry.npmjs.org' | |
| # Node 24 is required for trusted publishers (npm >= 10.9). | |
| # The app itself may target an older version -- ignore engine checks. | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --ignore-engines | |
| - name: Build and publish | |
| shell: bash | |
| env: | |
| INPUT_VERSION: ${{ inputs.version }} | |
| BRANCH_NAME: ${{ github.ref_name }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: .github/scripts/npm-publish.sh |