File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Release on NPM
2
2
3
3
on :
4
- release :
5
- types : [published] # runs when a GitHub Release is published
4
+ # release:
5
+ # types: [published] # runs when a GitHub Release is published
6
+ # TODO Remove
7
+ pull_request :
8
+ branches : [main]
6
9
7
10
permissions :
8
11
contents : read
16
19
publish :
17
20
name : Publish package from release tag
18
21
# Run only when tag is in the format `vX.Y.Z` produced by `npm version`
19
- if : startsWith(github.event.release.tag_name, 'v')
22
+ # if: startsWith(github.event.release.tag_name, 'v')
20
23
runs-on : ubuntu-latest
21
24
22
25
steps :
42
45
43
46
- name : Verify tag matches package.json version
44
47
run : |
45
- TAG="${{ github.event.release.tag_name }}"
48
+ # TAG="${{ github.event.release.tag_name }}"
49
+ TAG="v1.0.2"
46
50
PKG_VERSION=$(node -p "require('./package.json').version")
47
51
if [ "v$PKG_VERSION" != "$TAG" ]; then
48
52
echo "::error ::Tag ($TAG) does not match package.json version (v$PKG_VERSION)"
@@ -66,11 +70,11 @@ jobs:
66
70
67
71
# Stable release (vX.Y.Z)
68
72
if echo "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
69
- npm publish --provenance --access public
73
+ npm publish --provenance --access public --dry-run
70
74
71
75
# Pre-release (vX.Y.Z-*)
72
76
elif echo "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+-'; then
73
- npm publish --provenance --access public --tag next
77
+ npm publish --provenance --access public --tag next --dry-run
74
78
75
79
else
76
80
echo "Not a valid release tag ($TAG), skipping publish."
You can’t perform that action at this time.
0 commit comments