Skip to content

Commit b3d0614

Browse files
authored
chore: update release workflow
1 parent ce83cbd commit b3d0614

File tree

2 files changed

+6
-38
lines changed

2 files changed

+6
-38
lines changed

.github/workflows/gh-release.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: GitHub Release
22

33
on:
4-
workflow_run:
5-
workflows: [CI]
6-
branches: [master]
7-
types: [completed]
4+
schedule:
5+
- cron: '30 2 * * 5' # Weekly
6+
workflow_dispatch: # manual trigger
87

98
concurrency:
109
group: ${{ github.workflow }}-${{ github.ref }}
@@ -17,7 +16,7 @@ permissions:
1716

1817
jobs:
1918
call-workflow:
20-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
2120
uses: palashmon/reusable-workflows/.github/workflows/gh-release.yml@main
2221
with:
2322
branch_name: 'master'

.github/workflows/npm-publish.yml

+2-33
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,5 @@ on:
66
jobs:
77
build:
88
if: ${{ github.event.workflow_run.conclusion == 'success' }}
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: ⬇️ Checkout repo
12-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
13-
14-
- name: ⚙️ Setup Node
15-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
16-
with:
17-
node-version: "20.x"
18-
19-
- name: 📥 Install Dependencies
20-
run: npm i
21-
- run: npm test
22-
23-
publish-npm:
24-
needs: build
25-
runs-on: ubuntu-latest
26-
steps:
27-
- name: ⬇️ Checkout repo
28-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
29-
- name: ⚙️ Setup Node
30-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
31-
with:
32-
node-version: "20.x"
33-
registry-url: "https://registry.npmjs.org"
34-
35-
- name: 📥 Install Dependencies
36-
run: npm i
37-
38-
- name: Publish NPM Release
39-
run: npm publish
40-
env:
41-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
9+
uses: palashmon/reusable-workflows/.github/workflows/npm-publish.yml@main
10+
secrets: inherit

0 commit comments

Comments
 (0)