Skip to content

Commit b430933

Browse files
authored
release: cut v3.0.0 for Node 24 upgrade (#670)
- feat: move action runtime to node24 and require Node >=24 - chore: bump @types/node, enable Dependabot updates, rebuild dist - cut 3.0.0 release Signed-off-by: Rui Chen <[email protected]>
1 parent c2e35e0 commit b430933

9 files changed

Lines changed: 54 additions & 32 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ updates:
1212
- dependency-name: node-fetch
1313
versions:
1414
- ">=3.0.0"
15-
- dependency-name: "@types/node"
16-
versions:
17-
- ">=22.0.0"
1815
commit-message:
1916
prefix: "chore(deps)"
2017
- package-ecosystem: github-actions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 3.0.0
2+
3+
`3.0.0` is a major release that moves the action runtime from Node 20 to Node 24.
4+
Use `v3` on GitHub-hosted runners and self-hosted fleets that already support the
5+
Node 24 Actions runtime. If you still need the last Node 20-compatible line, stay on
6+
`v2.6.2`.
7+
8+
## What's Changed
9+
10+
### Other Changes 🔄
11+
12+
* Move the action runtime and bundle target to Node 24
13+
* Update `@types/node` to the Node 24 line and allow future Dependabot updates
14+
* Keep the floating major tag on `v3`; `v2` remains pinned to the latest `2.x` release
15+
116
## 2.6.2
217

318
## What's Changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Typically usage of this action involves adding a step to a build that
3939
is gated pushes to git tags. You may find `step.if` field helpful in accomplishing this
4040
as it maximizes the reuse value of your workflow for non-tag pushes.
4141

42+
`v3` requires a GitHub Actions runtime that supports Node 24. If you still need the
43+
last Node 20-compatible line, stay on `v2.6.2`.
44+
4245
Below is a simple example of `step.if` tag gating
4346

4447
```yaml
@@ -53,7 +56,7 @@ jobs:
5356
- name: Checkout
5457
uses: actions/checkout@v6
5558
- name: Release
56-
uses: softprops/action-gh-release@v2
59+
uses: softprops/action-gh-release@v3
5760
if: github.ref_type == 'tag'
5861
```
5962
@@ -74,7 +77,7 @@ jobs:
7477
- name: Checkout
7578
uses: actions/checkout@v6
7679
- name: Release
77-
uses: softprops/action-gh-release@v2
80+
uses: softprops/action-gh-release@v3
7881
```
7982
8083
### ⬆️ Uploading release assets
@@ -105,7 +108,7 @@ jobs:
105108
- name: Test
106109
run: cat Release.txt
107110
- name: Release
108-
uses: softprops/action-gh-release@v2
111+
uses: softprops/action-gh-release@v3
109112
if: github.ref_type == 'tag'
110113
with:
111114
files: Release.txt
@@ -129,7 +132,7 @@ jobs:
129132
- name: Test
130133
run: cat Release.txt
131134
- name: Release
132-
uses: softprops/action-gh-release@v2
135+
uses: softprops/action-gh-release@v3
133136
if: github.ref_type == 'tag'
134137
with:
135138
files: |
@@ -146,7 +149,7 @@ and keep the `files` patterns relative to that directory.
146149

147150
```yaml
148151
- name: Release
149-
uses: softprops/action-gh-release@v2
152+
uses: softprops/action-gh-release@v3
150153
if: github.ref_type == 'tag'
151154
with:
152155
working_directory: dist
@@ -175,7 +178,7 @@ jobs:
175178
- name: Generate Changelog
176179
run: echo "# Good things have arrived" > ${{ github.workspace }}-CHANGELOG.txt
177180
- name: Release
178-
uses: softprops/action-gh-release@v2
181+
uses: softprops/action-gh-release@v3
179182
if: github.ref_type == 'tag'
180183
with:
181184
body_path: ${{ github.workspace }}-CHANGELOG.txt
@@ -193,7 +196,7 @@ comparison range does not match the release series you want to publish.
193196

194197
```yaml
195198
- name: Release
196-
uses: softprops/action-gh-release@v2
199+
uses: softprops/action-gh-release@v3
197200
with:
198201
tag_name: stage-2026-03-15
199202
target_commitish: ${{ github.sha }}

RELEASE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ Use this checklist when cutting a new `action-gh-release` release.
2222
- `npm run build`
2323
- `npm test`
2424
5. Commit the release prep.
25-
- Use a plain release commit message like `release 2.5.4`.
25+
- Use a plain release commit message like `release 3.0.0`.
2626
6. Create the annotated tag for the release commit.
27-
- Example: `git tag -a v2.5.4 -m "v2.5.4"`
27+
- Example: `git tag -a v3.0.0 -m "v3.0.0"`
2828
7. Push the commit and tag.
29-
- Example: `git push origin master && git push origin v2.5.4`
29+
- Example: `git push origin master && git push origin v3.0.0`
3030
8. Move the floating major tag to the new release tag.
31-
- For the current major line, either run `npm run updatetag` or update the script first if the major ever changes.
31+
- For the current major line, run `npm run updatetag` to move `v3`.
32+
- Keep `v2` pinned to the latest `2.x` release for consumers that still need the Node 20 runtime.
3233
- Verify the floating tag points at the same commit as the new full tag.
3334
9. Create the GitHub release from the new tag.
3435
- Prefer the release body from [CHANGELOG.md](CHANGELOG.md), then let GitHub append generated notes only if they add value.

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ outputs:
7575
assets:
7676
description: "JSON array containing information about each uploaded asset, in the format given [here](https://docs.github.com/en/rest/reference/repos#upload-a-release-asset--code-samples) (minus the `uploader` field)"
7777
runs:
78-
using: "node20"
78+
using: "node24"
7979
main: "dist/index.js"
8080
branding:
8181
color: "green"

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "action-gh-release",
3-
"version": "2.6.2",
3+
"version": "3.0.0",
44
"private": true,
55
"description": "GitHub Action for creating GitHub Releases",
66
"main": "lib/main.js",
77
"scripts": {
8-
"build": "esbuild src/main.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/index.js --minify",
9-
"build-debug": "esbuild src/main.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/index.js --sourcemap --keep-names",
8+
"build": "esbuild src/main.ts --bundle --platform=node --format=cjs --target=node24 --outfile=dist/index.js --minify",
9+
"build-debug": "esbuild src/main.ts --bundle --platform=node --format=cjs --target=node24 --outfile=dist/index.js --sourcemap --keep-names",
1010
"typecheck": "tsc --noEmit",
1111
"test": "vitest --coverage",
1212
"fmt": "prettier --write \"src/**/*.ts\" \"__tests__/**/*.ts\"",
1313
"fmtcheck": "prettier --check \"src/**/*.ts\" \"__tests__/**/*.ts\"",
14-
"updatetag": "git tag -d v2 && git push origin :v2 && git tag -a v2 -m '' && git push origin v2"
14+
"updatetag": "git tag -d v3 >/dev/null 2>&1 || true; git push origin :v3 >/dev/null 2>&1 || true; git tag -a v3 -m '' && git push origin v3"
1515
},
1616
"repository": {
1717
"type": "git",
@@ -21,6 +21,9 @@
2121
"actions"
2222
],
2323
"author": "softprops",
24+
"engines": {
25+
"node": ">=24"
26+
},
2427
"dependencies": {
2528
"@actions/core": "^3.0.0",
2629
"@actions/github": "^9.1.0",
@@ -32,7 +35,7 @@
3235
"devDependencies": {
3336
"@types/glob": "^9.0.0",
3437
"@types/mime-types": "^3.0.1",
35-
"@types/node": "^20.19.39",
38+
"@types/node": "^24",
3639
"@vitest/coverage-v8": "^4.1.4",
3740
"esbuild": "^0.28.0",
3841
"prettier": "3.8.2",

src/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export const upload = async (
367367
size,
368368
mime,
369369
token: config.github_token,
370-
data: fh.readableWebStream({ type: 'bytes' }),
370+
data: fh.readableWebStream(),
371371
});
372372
} finally {
373373
await fh.close();

0 commit comments

Comments
 (0)