Skip to content

Commit 7d44ae6

Browse files
committed
update workflows
1 parent 5efc8ba commit 7d44ae6

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8+
workflow_dispatch:
89

910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
1213
strategy:
1314
matrix:
14-
node-version: [6.x, 8.x, 10.x, 14.x, 16.x]
15+
node-version: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
1516
steps:
1617
- uses: actions/checkout@v2
1718
- name: Set up Node.js version ${{ matrix.node-version }}

.github/workflows/node-js-publish.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@ name: Node.js Publish
33
on:
44
release:
55
types: [created]
6-
6+
workflow_dispatch:
7+
inputs:
8+
release_tag_to_publish:
9+
description: 'The name of the published release tag (e.g. v1.0.0)'
10+
required: true
11+
type: string
712
jobs:
813
build:
914
runs-on: ubuntu-latest
1015
strategy:
1116
matrix:
12-
node-version: [6.x, 8.x, 10.x, 14.x, 16.x]
17+
node-version: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
1318
steps:
1419
- uses: actions/checkout@v2
20+
with:
21+
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag_to_publish }}
1522
- name: Set up Node.js version ${{ matrix.node-version }}
1623
uses: actions/setup-node@v1
1724
with:
@@ -26,9 +33,11 @@ jobs:
2633
runs-on: ubuntu-latest
2734
steps:
2835
- uses: actions/checkout@v2
36+
with:
37+
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag_to_publish }}
2938
- uses: actions/setup-node@v2
3039
with:
31-
node-version: '16.x'
40+
node-version: '22.x'
3241
registry-url: https://registry.npmjs.org/
3342
- run: npm ci
3443
- run: npm publish

0 commit comments

Comments
 (0)