Skip to content

Commit 0bfa47d

Browse files
authored
chore: add workflow updates
1 parent 1f7686c commit 0bfa47d

File tree

4 files changed

+30
-35
lines changed

4 files changed

+30
-35
lines changed

.github/workflows/auto-approve.yml

-9
This file was deleted.

.github/workflows/gh-release.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: GitHub Release
2+
3+
on:
4+
schedule:
5+
- cron: '30 2 * * 5' # Weekly
6+
workflow_dispatch: # manual trigger
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
packages: write
15+
pull-requests: write
16+
17+
jobs:
18+
call-workflow:
19+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
20+
uses: palashmon/reusable-workflows/.github/workflows/gh-release.yml@main
21+
with:
22+
branch_name: 'master'

.github/workflows/npm-publish.yml

+7-25
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
1-
name: Publish Package to npmjs
1+
name: Publish NPM Release
22
on:
3-
release:
4-
types: [published]
3+
workflow_run:
4+
workflows: ["GitHub Release"]
5+
types: [completed]
56
jobs:
67
build:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
10-
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
11-
with:
12-
node-version: "20.x"
13-
- run: npm i
14-
- run: npm test
15-
16-
publish-npm:
17-
needs: build
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
21-
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
22-
with:
23-
node-version: "20.x"
24-
registry-url: "https://registry.npmjs.org"
25-
- run: npm i
26-
- run: npm publish
27-
env:
28-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
8+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
9+
uses: palashmon/reusable-workflows/.github/workflows/npm-publish.yml@main
10+
secrets: inherit

.github/workflows/pr-labeler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ jobs:
55
apply:
66
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} # only PRs from this repo
77
uses: palashmon/reusable-workflows/.github/workflows/labeler-reusable.yml@main
8-
secrets: inherit
8+
secrets: inherit

0 commit comments

Comments
 (0)