release: vue 9.0.0 #125
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: '@nativescript/template-* -> npm' | |
| on: | |
| push: | |
| branches: [ 'main' ] | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: npm-publish | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: 22 | |
| - name: Update npm (required for OIDC trusted publishing) | |
| run: | | |
| corepack enable npm | |
| corepack install -g npm@11.5.1 | |
| test "$(npm --version)" = "11.5.1" | |
| test "$(npx --version)" = "11.5.1" | |
| - name: Setup | |
| run: npm install | |
| - name: Prepare Templates | |
| run: npm run prepare-templates | |
| - name: Publish All Templates (OIDC trusted publishing) | |
| if: ${{ vars.USE_NPM_TOKEN != 'true' }} | |
| run: | | |
| echo "Publishing templates to npm with tag $NPM_TAG via OIDC trusted publishing..." | |
| # run publish in every package; only ignore "already published" errors | |
| npx lerna exec --no-bail --stream --concurrency 1 -- "bash \"$GITHUB_WORKSPACE/.github/scripts/npm-publish-ci.sh\"" | |
| - name: Publish All Templates (granular token) | |
| if: ${{ vars.USE_NPM_TOKEN == 'true' }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
| run: | | |
| echo "Publishing templates to npm with tag $NPM_TAG via granular token..." | |
| echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc | |
| # run publish in every package; only ignore "already published" errors | |
| npx lerna exec --no-bail --stream --concurrency 1 -- "bash \"$GITHUB_WORKSPACE/.github/scripts/npm-publish-ci.sh\"" |