Skip to content

Commit c0ffa10

Browse files
authored
chore(publish): move npm publish to CI (#893)
1 parent 6e169e0 commit c0ffa10

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
name: Release
22

3-
permissions:
4-
contents: write
5-
63
on:
74
push:
85
tags:
96
- 'v*'
107

118
jobs:
129
release:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
with:
17-
fetch-depth: 0
18-
19-
- uses: actions/setup-node@v3
20-
with:
21-
node-version: 20.17.0
22-
23-
- run: npx changelogithub
24-
env:
25-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10+
uses: sxzz/workflows/.github/workflows/release.yml@v1
11+
with:
12+
publish: true
13+
permissions:
14+
contents: write
15+
id-token: write

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vite-plugin-pwa",
33
"type": "module",
44
"version": "1.0.3",
5-
"packageManager": "pnpm@10.13.1",
5+
"packageManager": "pnpm@10.18.2",
66
"description": "Zero-config PWA for Vite",
77
"author": "antfu <anthonyfu117@hotmail.com>",
88
"license": "MIT",
@@ -93,8 +93,8 @@
9393
"build": "rimraf dist && esno scripts/build.ts",
9494
"build-js-example-on-root": "vite build --outDir=../../dist-examples-root -c ./examples/vanilla-js-custom-sw/vite.config.js ./examples/vanilla-js-custom-sw",
9595
"build-vue-example-on-root": "DEBUG=vite-plugin-pwa BASE_URL=/ SOURCE_MAP=true CLAIMS=true vite build --outDir=../../dist-examples-root -c ./examples/vue-router/vite.config.ts ./examples/vue-router",
96-
"prepublishOnly": "npm run build",
97-
"release": "bumpp && npm publish",
96+
"prepublishOnly": "pnpm build",
97+
"release": "bumpp",
9898
"examples": "esno scripts/run-examples.ts",
9999
"example:vue:dev:cdn": "pnpm -C examples/vue-basic-cdn run dev",
100100
"example:vue:build:cdn": "pnpm -C examples/vue-basic-cdn run build",
@@ -106,7 +106,8 @@
106106
"test-solid": "pnpm -C examples/solid-router run test",
107107
"test-svelte": "pnpm -C examples/svelte-routify run test",
108108
"test-typescript": "pnpm -C examples/vanilla-ts-no-ip run test",
109-
"test": "nr test-vue && nr test-react && nr test-preact && nr test-solid && nr test-svelte && nr test-typescript",
109+
"test": "nr test-vue && nr test-react && nr test-preact && nr test-solid && nr test-typescript",
110+
"test:node20": "nr test-vue && nr test-react && nr test-preact && nr test-solid && nr test-svelte && nr test-typescript",
110111
"test:vite-ecosystem-ci": "nr test-typescript"
111112
},
112113
"peerDependencies": {

0 commit comments

Comments
 (0)