Skip to content

Commit eef0cee

Browse files
committed
Cherry-pick to master: Merge pull request #3456 from cytoscape/feature/upgraded-gh-actions-vers
Update GH actions: versions & npm publish config
1 parent 19e3e38 commit eef0cee

7 files changed

Lines changed: 25 additions & 29 deletions

File tree

.github/workflows/feature-release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ jobs:
1515

1616
steps:
1717
- name: checkout unstable branch
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v6
1919
with:
2020
ref: 'unstable'
2121
fetch-depth: 0
22-
- uses: actions/setup-node@v3
22+
- uses: actions/setup-node@v6
2323
with:
24-
node-version: 22
24+
node-version-file: .nvmrc
2525
cache: 'npm'
26-
registry-url: 'https://registry.npmjs.org'
2726
- name: Install dependencies
2827
run: npm install
2928
- name: Install Playwright Browsers
@@ -44,7 +43,7 @@ jobs:
4443
jq --version
4544
shell: bash
4645
- name: Checkout Master Branch
47-
uses: actions/checkout@v3
46+
uses: actions/checkout@v6
4847
with:
4948
ref: master
5049
fetch-depth: 0

.github/workflows/md/Feature_Release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Below are the steps performed by the "Feature Release Test" GitHub Action:
2828

2929
1. **Checkout Patch Branch**:
3030
- Action: Checks out the `unstable` branch.
31-
- Uses: `actions/checkout@v3`.
31+
- Uses: `actions/checkout@v6`.
3232

3333
2. **Setup Node.js Environment**:
3434
- Action: Sets up Node.js environment.
35-
- Uses: `actions/setup-node@v3`.
35+
- Uses: `actions/setup-node@v6`.
3636
- Node Version: 18.
3737
- Caches npm packages.
3838

@@ -43,7 +43,7 @@ Below are the steps performed by the "Feature Release Test" GitHub Action:
4343

4444
4. **Checkout Master Branch**:
4545
- Action: Checks out the `master` branch.
46-
- Uses: `actions/checkout@v3`.
46+
- Uses: `actions/checkout@v6`.
4747

4848
5. **Merge Unstable to Master Branch**:
4949
- Action: Merges changes from `unstable` to `master` branch.

.github/workflows/md/Patch_Backport_Release.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ The "Patch Release Test" GitHub Action comprises the following steps:
3333

3434
2. **Checkout Patch Branch**:
3535
- Action: Checks out the specified patch branch.
36-
- Uses: `actions/checkout@v3`.
36+
- Uses: `actions/checkout@v6`.
3737
- Branch: The branch specified by the `BRANCH` environment variable.
3838

3939
3. **Setup Node.js Environment**:
4040
- Action: Sets up Node.js environment for the workflow.
41-
- Uses: `actions/setup-node@v3`.
41+
- Uses: `actions/setup-node@v6`.
4242
- Node Version: 18.
4343
- Caches npm packages.
4444

@@ -57,7 +57,7 @@ The "Patch Release Test" GitHub Action comprises the following steps:
5757

5858
7. **Checkout Master Branch**:
5959
- Action: Checks out the `master` branch.
60-
- Uses: `actions/checkout@v3`.
60+
- Uses: `actions/checkout@v6`.
6161

6262
8. **Update Version on Master**:
6363
- Action: Updates the `versions.json` file on the `master` branch.
@@ -66,7 +66,7 @@ The "Patch Release Test" GitHub Action comprises the following steps:
6666

6767
9. **Checkout Patch Branch Again**:
6868
- Action: Checks out the specified patch branch.
69-
- Uses: `actions/checkout@v3`.
69+
- Uses: `actions/checkout@v6`.
7070
- Branch: The branch specified by the `BRANCH` environment variable.
7171

7272
10. **Update Version on Unstable**:

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ on:
66
jobs:
77
publish:
88
runs-on: ubuntu-latest
9+
environment: prod
910
permissions:
1011
contents: read
1112
id-token: write
1213

1314
steps:
14-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v6
1516
with:
1617
ref: master
17-
- uses: actions/setup-node@v3
18+
- uses: actions/setup-node@v6
1819
with:
19-
node-version: 22
20-
cache: 'npm'
21-
registry-url: 'https://registry.npmjs.org'
22-
- name: Install dependencies
23-
run: npm install
20+
node-version-file: .nvmrc
21+
package-manager-cache: false
2422
- name: Publish Package To npmjs
2523
run: npm publish --provenance

.github/workflows/patch-release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ jobs:
2020
echo "BRANCH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
2121
echo "Branch: " $BRANCH
2222
- name: checkout patch branch
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v6
2424
with:
2525
ref: ${{ env.BRANCH }}
26-
- uses: actions/setup-node@v3
26+
- uses: actions/setup-node@v6
2727
with:
28-
node-version: 22
28+
node-version-file: .nvmrc
2929
cache: 'npm'
30-
registry-url: 'https://registry.npmjs.org'
3130
- name: Install dependencies
3231
run: npm install
3332
- name: Install Playwright Browsers
@@ -48,7 +47,7 @@ jobs:
4847
run: echo "# version:" ${{ env.VERSION }}
4948
shell: bash
5049
- name: checkout master branch
51-
uses: actions/checkout@v3
50+
uses: actions/checkout@v6
5251
with:
5352
ref: master
5453
fetch-depth: 0
@@ -66,7 +65,7 @@ jobs:
6665
git add . && git commit -m "Docs: Add ${{ env.VERSION }} to versions.json"
6766
git push
6867
- name: checkout unstable branch
69-
uses: actions/checkout@v3
68+
uses: actions/checkout@v6
7069
with:
7170
ref: unstable
7271
fetch-depth: 0

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ jobs:
66
ci:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-node@v4
9+
- uses: actions/checkout@v6
10+
- uses: actions/setup-node@v6
1111
with:
12-
node-version: lts/*
12+
node-version-file: .nvmrc
1313
- name: Install dependencies
1414
run: npm ci
1515
- name: Install Playwright Browsers

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

0 commit comments

Comments
 (0)