Skip to content

Commit d250fef

Browse files
committed
more actions improvements
1 parent 6b9c56c commit d250fef

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.github/workflows/npm-publish-stable.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@ on:
77
release:
88
types: [created]
99
workflow_dispatch:
10+
workflow_call:
11+
inputs:
12+
version:
13+
required: true
14+
type: string
15+
16+
secrets:
17+
NPM_ACCESS_TOKEN:
18+
required: true
1019

1120
jobs:
1221
build:
22+
name: 🔨 Build
1323
runs-on: ubuntu-latest
1424
steps:
1525
- uses: actions/checkout@v3
@@ -21,7 +31,7 @@ jobs:
2131
node-version: 18
2232
registry-url: https://npm.pkg.github.com/
2333

24-
- name: Cache node modules
34+
- name: 💾 Fetch Cache
2535
id: cache-yarn
2636
uses: actions/cache@v3
2737
env:
@@ -37,7 +47,7 @@ jobs:
3747
name: 📦 Install Dependencies
3848
run: NO_YARN_POSTINSTALL=1 yarn install --frozen-lockfile
3949

40-
- name: Yarn Build
50+
- name: 🔨 Build
4151
run: yarn build
4252

4353
test:
@@ -64,14 +74,16 @@ jobs:
6474
run: yarn test
6575

6676
publish-gpr:
77+
name: 🚀 NPM Publish
6778
needs: build
79+
environment: production
6880
runs-on: ubuntu-latest
6981
permissions:
7082
contents: read
7183
packages: write
7284
steps:
7385
- uses: actions/checkout@v3
74-
- name: Cache node modules
86+
- name: 💾 Fetch Cache
7587
id: cache-yarn
7688
uses: actions/cache@v3
7789
env:
@@ -87,7 +99,7 @@ jobs:
8799
- name: 🔨 Build
88100
run: yarn build
89101

90-
- run: yarn release-stable
91-
name: 🚀 Release Stable
102+
- name: 🚀 Release Stable
103+
run: yarn release-stable
92104
env:
93105
NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
test:
11+
name: 🧪 Test
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)