npm-publish-nuxt #13
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
| # This workflow will publish the nuxt package to GitHub Packages when a release is created | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
| name: npm-publish-nuxt | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: {} | |
| jobs: | |
| publish-npm: | |
| permissions: | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'main' | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x.x | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v4 | |
| id: pnpm-install | |
| - name: Get PNPM Store Directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup PNPM Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install Dependencies | |
| run: pnpm install --ignore-scripts --frozen-lockfile | |
| - name: Build Library | |
| run: pnpm run build --filter @bootstrap-vue-next/nuxt | |
| - name: Publish Nuxt | |
| run: pnpm publish --tag latest --filter @bootstrap-vue-next/nuxt --access=public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_NUXT_PACKAGE}} | |
| NPM_CONFIG_PROVENANCE: true |