1
- name : Release to NPM when a tag is pushed
1
+ name : Release
2
2
3
3
on :
4
4
push :
5
5
tags :
6
- - ' v*.*.*'
7
- - ' v*.*.*-rc.*'
6
+ - " v*.*.*"
8
7
9
8
jobs :
10
9
release :
16
15
uses : actions/checkout@v3
17
16
with :
18
17
fetch-depth : 0
19
-
20
- - name : Check Branch and Tag
21
- run : |
22
- BRANCH=$(git branch -r --contains ${{ github.ref }})
23
- TAG=${{ github.ref_name }}
24
-
25
- if [[ $BRANCH =~ origin/main$ ]]; then
26
- if [[ $TAG =~ -rc\. ]]; then
27
- echo "[SKIPPED] Release candidate tags (v*.*.*-rc.*) are only allowed on develop branch"
28
- exit 0
29
- fi
30
- elif [[ $BRANCH =~ origin/develop$ ]]; then
31
- if [[ ! $TAG =~ -rc\. ]]; then
32
- echo "[SKIPPED] Release tags (v*.*.*) are only allowed on main branch. Use release candidate tags (v*.*.*-rc.*)"
33
- exit 1
34
- fi
35
- else
36
- echo "[SKIPPED] Tags can only be pushed from main or develop branches"
37
- exit 1
38
- fi
18
+ ref : main
39
19
40
20
- name : Setup pnpm 9
41
21
uses : pnpm/action-setup@v4
@@ -48,12 +28,12 @@ jobs:
48
28
node-version : 18.x
49
29
50
30
- name : Install Dependencies 🔧
51
- run : pnpm install
31
+ run : pnpm i
52
32
53
33
- name : Build Step 🔧
54
34
env :
55
35
CI : " "
56
- run : pnpm run ci:build
36
+ run : npm run ci:build
57
37
58
38
- name : Create .npmrc
59
39
run : |
@@ -64,23 +44,14 @@ jobs:
64
44
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
65
45
66
46
- name : Bump Package Version
67
- run : pnpm run bump-version
47
+ run : npm run bump-version
68
48
working-directory : ./packages/raystack
69
49
env :
70
50
GIT_REFNAME : ${{ github.ref_name }}
71
51
72
52
- name : Run Release 🚀
73
- run : pnpm run release:ci
53
+ run : npm run release:ci
74
54
working-directory : ./packages/raystack
75
55
env :
76
56
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
78
-
79
- - name : Generate GitHub Release Notes 📓
80
- env :
81
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82
- run : |
83
- gh release create "$GITHUB_REF_NAME" \
84
- --repo "$GITHUB_REPOSITORY" \
85
- --generate-notes \
86
- --verify-tag
57
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments