-
-
Notifications
You must be signed in to change notification settings - Fork 197
45 lines (38 loc) · 1.45 KB
/
Copy pathpublish.yml
File metadata and controls
45 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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. create-vite@1.0.0
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Set node version to LTS
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
# disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning)
package-manager-cache: false
- name: Disallow installation scripts
run: yq '.allowBuilds[]=false' -i pnpm-workspace.yaml
- name: Install deps
run: pnpm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
- name: Publish package
run: npm i -g npm@^11.5.2 && pnpm run ci-publish "$GITHUB_REF_NAME"