ci: upgrade GitHub Actions to support Node.js 24 (#951)

* ci: upgrade GitHub Actions to support Node.js 24

- pnpm/action-setup: v4 → v5
- actions/upload-artifact: v4 → v6
- actions/download-artifact: v4 → v6
- sync.yaml: replace inactive aormsby/Fork-Sync-With-Upstream-action with gh repo sync

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: replace softprops/action-gh-release with gh release CLI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ci): use gh release upload instead of create for existing releases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-04-06 21:44:07 +08:00
committed by GitHub
parent 5248c03b6c
commit 42281cdc49
7 changed files with 27 additions and 32 deletions

View File

@@ -23,7 +23,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
id: pnpm-install
with:

View File

@@ -24,7 +24,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
id: pnpm-install
with:

View File

@@ -19,7 +19,7 @@ jobs:
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: playwright-report
path: |

View File

@@ -21,7 +21,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10
@@ -58,7 +58,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10

View File

@@ -39,7 +39,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10

View File

@@ -12,14 +12,7 @@ jobs:
if: ${{ github.event.repository.fork }}
steps:
- uses: actions/checkout@v6
- name: Sync upstream changes
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
with:
upstream_sync_repo: dreamhunter2333/cloudflare_temp_email
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
test_mode: false
run: gh repo sync ${{ github.repository }} --source dreamhunter2333/cloudflare_temp_email --branch main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -17,7 +17,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10
@@ -30,7 +30,7 @@ jobs:
run: cd frontend/dist/ && zip -r frontend.zip * && mv frontend.zip ../
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: frontend
path: frontend/frontend.zip
@@ -46,7 +46,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10
@@ -59,7 +59,7 @@ jobs:
run: cd frontend/dist/ && zip -r telegram-frontend.zip * && mv telegram-frontend.zip ../
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: telegram-frontend
path: frontend/telegram-frontend.zip
@@ -75,7 +75,7 @@ jobs:
with:
node-version: 22
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5
name: Install pnpm
with:
version: 10
@@ -101,13 +101,13 @@ jobs:
zip -r worker-with-wasm-mail-parser.zip dist/worker.js dist/*.wasm
- name: Upload worker.js
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: worker-js
path: worker/worker.js
- name: Upload wasm worker
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: worker-wasm
path: worker/worker-with-wasm-mail-parser.zip
@@ -119,15 +119,17 @@ jobs:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
path: artifacts
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/frontend/frontend.zip
artifacts/telegram-frontend/telegram-frontend.zip
artifacts/worker-js/worker.js
artifacts/worker-wasm/worker-with-wasm-mail-parser.zip
- name: Upload Assets to Release
run: |
gh release upload "${{ github.ref_name }}" \
artifacts/frontend/frontend.zip \
artifacts/telegram-frontend/telegram-frontend.zip \
artifacts/worker-js/worker.js \
artifacts/worker-wasm/worker-with-wasm-mail-parser.zip \
--clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}