1
- name : 🏷️ Lerna Publish NPM Latest
1
+ name : 🏷️ Release to NPM
2
2
3
3
on :
4
4
workflow_dispatch :
@@ -30,36 +30,24 @@ jobs:
30
30
uses : actions/checkout@v4
31
31
with :
32
32
fetch-depth : 0
33
- token : ${{ secrets.GITHUB_TOKEN }}
34
33
35
34
- if : ${{ github.event.pull_request.merged != true && contains('["ghiscoding"]', github.actor) != true }}
36
35
name : Exit early when current actor is not allowed to push new release
37
36
run : |
38
37
echo "Error: Your GitHub username (${{ github.actor }}) is not on the allowed list of admins for this workflow"
39
38
exit 1
40
39
41
- - name : Set NodeJS
42
- uses : actions/setup-node@v4
43
- with :
44
- registry-url : ' https://registry.npmjs.org/'
45
- node-version : 24
46
-
47
40
- name : Install pnpm
48
41
uses : pnpm/action-setup@v3
49
42
with :
50
43
version : 10
51
44
run_install : false
52
45
53
- - name : Get pnpm store directory
54
- run : echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
55
-
56
- - name : Setup pnpm cache
57
- uses : actions/cache@v4
46
+ - name : Set NodeJS
47
+ uses : actions/setup-node@v4
58
48
with :
59
- path : ${{ env.STORE_PATH }}
60
- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
61
- restore-keys : |
62
- ${{ runner.os }}-pnpm-store-
49
+ registry-url : ' https://registry.npmjs.org/'
50
+ node-version : 24
63
51
64
52
- name : Run pnpm install dependencies
65
53
run : pnpm install
@@ -73,19 +61,19 @@ jobs:
73
61
if ${{inputs.dryrun == true && inputs.graduate != true}}
74
62
then
75
63
echo "LERNA_VERSION_TYPE=🧪 Dry-Run" >> $GITHUB_ENV
76
- echo "LERNA_VERSION_QUERY=pnpm exec lerna version --yes --dry-run" >> $GITHUB_ENV
64
+ echo "LERNA_VERSION_QUERY=lerna version --yes --dry-run" >> $GITHUB_ENV
77
65
elif ${{inputs.dryrun == true && inputs.graduate == true}}
78
66
then
79
67
echo "LERNA_VERSION_TYPE=🧪 Dry-Run w/Graduate" >> $GITHUB_ENV
80
- echo "LERNA_VERSION_QUERY=pnpm exec lerna version --yes --dry-run --conventional-graduate" >> $GITHUB_ENV
68
+ echo "LERNA_VERSION_QUERY=lerna version --yes --dry-run --conventional-graduate" >> $GITHUB_ENV
81
69
elif ${{inputs.dryrun != true && inputs.graduate == true}}
82
70
then
83
71
echo "LERNA_VERSION_TYPE=🚀 Prod Version w/Graduate" >> $GITHUB_ENV
84
- echo "LERNA_VERSION_QUERY=pnpm exec lerna version --yes --conventional-graduate" >> $GITHUB_ENV
72
+ echo "LERNA_VERSION_QUERY=lerna version --yes --conventional-graduate" >> $GITHUB_ENV
85
73
elif ${{inputs.dryrun != true && inputs.graduate != true}}
86
74
then
87
75
echo "LERNA_VERSION_TYPE=🚀 Prod Version" >> $GITHUB_ENV
88
- echo "LERNA_VERSION_QUERY=pnpm exec lerna version --yes" >> $GITHUB_ENV
76
+ echo "LERNA_VERSION_QUERY=lerna version --yes" >> $GITHUB_ENV
89
77
fi
90
78
91
79
- name : Final version query type - ${{ env.LERNA_VERSION_TYPE }}
0 commit comments