Icons Release - main release version #183
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: Icons Release | |
| run-name: Icons Release - main release version | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| id-token: write # Required for OIDC | |
| env: | |
| CI: true | |
| jobs: | |
| main-build: | |
| if: github.event_name == 'release' && contains(github.event.release.name, 'icons') | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: icons | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: icons/.node-version | |
| registry-url: "https://registry.npmjs.org" | |
| cache: "pnpm" | |
| cache-dependency-path: icons/pnpm-lock.yaml | |
| - run: npm install -g npm@latest # Required for trusted publishing (npm 11.5.1 or later) | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Set release channel | |
| id: release_channel | |
| run: | | |
| channel="$(npm run release-channel --silent)" | |
| echo "channel=$channel" >> "$GITHUB_OUTPUT" | |
| - name: Publish `@bcc-code/icons` | |
| run: npm publish --tag ${{ steps.release_channel.outputs.channel }} | |
| - name: Publish `@bcc-code/icons-vue` | |
| run: npm publish ./vue --tag ${{ steps.release_channel.outputs.channel }} |