Publish Package #37
Workflow file for this run
This file contains 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: Publish Package | |
on: | |
push: | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
- "plugin-*" # Push events to matching plugin-*, i.e. plugin-(vue|vue-jsx|react|legacy)@1.0.0 | |
- "create-vite*" # # Push events to matching create-vite*, i.e. [email protected] | |
jobs: | |
publish: | |
# prevents this action from running on forks | |
if: github.repository == 'vitejs/vite-plugin-vue' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
environment: Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set node version to LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
registry-url: https://registry.npmjs.org/ | |
cache: "pnpm" | |
- name: Install deps | |
run: pnpm install | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | |
# https://github.com/npm/cli/pull/6978 | |
- name: Downgrade npm | |
run: npm i -g [email protected] | |
- name: Publish package | |
run: pnpm run ci-publish ${{ github.ref_name }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |