Skip to content

Commit d48f568

Browse files
authored
fix publish script (#358)
* fix publish script * Change node version from CI to v2
1 parent 6dcdc2c commit d48f568

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: publish to npm
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
tags:
5+
- v*
56

67
jobs:
78
publish-npm:
@@ -14,13 +15,7 @@ jobs:
1415
registry-url: https://registry.npmjs.org/
1516
- name: Check release validity
1617
run: sh .github/scripts/check-release.sh
17-
- name: Publish with latest tag
18-
if: "!github.event.release.prerelease"
18+
- name: Publish
1919
run: npm publish .
2020
env:
2121
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
22-
- name: Publish with strapi_v3 tag
23-
if: "github.event.release.prerelease"
24-
run: npm publish . --tag strapi_v3
25-
env:
26-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)