Skip to content

Commit 3629dc2

Browse files
committed
temp: dry-run
1 parent 7c88083 commit 3629dc2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Release on NPM
22

33
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]
69

710
permissions:
811
contents: read
@@ -16,7 +19,7 @@ jobs:
1619
publish:
1720
name: Publish package from release tag
1821
# 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')
2023
runs-on: ubuntu-latest
2124

2225
steps:
@@ -42,7 +45,8 @@ jobs:
4245

4346
- name: Verify tag matches package.json version
4447
run: |
45-
TAG="${{ github.event.release.tag_name }}"
48+
# TAG="${{ github.event.release.tag_name }}"
49+
TAG="v1.0.2"
4650
PKG_VERSION=$(node -p "require('./package.json').version")
4751
if [ "v$PKG_VERSION" != "$TAG" ]; then
4852
echo "::error ::Tag ($TAG) does not match package.json version (v$PKG_VERSION)"
@@ -66,11 +70,11 @@ jobs:
6670
6771
# Stable release (vX.Y.Z)
6872
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
7074
7175
# Pre-release (vX.Y.Z-*)
7276
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
7478
7579
else
7680
echo "Not a valid release tag ($TAG), skipping publish."

0 commit comments

Comments
 (0)