Skip to content

Commit f8d69b4

Browse files
committed
chore: add release GitHub action (dry-run)
1 parent 648b2f9 commit f8d69b4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/onRelease.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup
15+
uses: ./.github/actions/setup
16+
17+
- name: Set npm tag
18+
id: set-npm-tag
19+
run: |
20+
RELEASE_TAG=${{ github.event.release.tag_name }}
21+
if [[ $RELEASE_TAG == *"rc"* || $RELEASE_TAG == *"alpha"* || $RELEASE_TAG == *"beta"* ]]; then
22+
echo "NPM_TAG=next" >> $GITHUB_OUTPUT
23+
else
24+
echo "NPM_TAG=latest" >> $GITHUB_OUTPUT
25+
fi
26+
27+
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c
28+
with:
29+
token: "${{ secrets.NPM_TOKEN }}"
30+
tag: ${{ steps.set-npm-tag.outputs.NPM_TAG }}
31+
dry-run: true

0 commit comments

Comments
 (0)