Skip to content

Commit a76da93

Browse files
committed
refactor(ci): consolidate and optimize native build workflows
Merged duplicate workflows and significantly improved the native build pipeline: Consolidation & DRY: - Merged build-native.yml and build-native-scanner.yml into single workflow - Removed unused scripts: bin/build-native, bin/hash, bin/hash.js Release Management: - Centralized all release uploads in finalize-release job - Replaced svenstaro/upload-release-action with native gh CLI - Removed manual checksum generation (GitHub provides manifests) Security & Best Practices: - Added explicit least-privilege permissions (contents: read by default) - Only finalize-release has contents: write permission - Replaced custom PAT with built-in GITHUB_TOKEN - Added concurrency control to cancel outdated PR builds - Added timeouts to all jobs (5-60 min based on complexity) - Use ubuntu-slim for bookkeeping jobs Dependencies & Fixes: - Updated all GitHub Actions to latest versions: • checkout: v3 → v6 • cache: v3 → v5 • setup-node: v4 → v6 • upload-artifact: v4 → v6 • download-artifact: v4 → v7 - Fixed deprecated set-output command in setup-node action - Fixed missing Node.js setup in finalize-release job - Actually use x64 macos runner to build for x64 - Made code signing optional for non-tag builds
1 parent ed8c7e7 commit a76da93

6 files changed

Lines changed: 135 additions & 551 deletions

File tree

.github/actions/setup-node/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ runs:
44
using: 'composite'
55
steps:
66
- name: Setup Node
7-
uses: actions/setup-node@v4
7+
uses: actions/setup-node@v6
88
with:
99
node-version: 18
1010
- name: Detect Yarn cache dir
1111
id: yarn-cache-dir-path
1212
shell: bash
13-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
13+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
1414
- name: Restore Yarn packages
15-
uses: actions/cache/restore@v3
15+
uses: actions/cache/restore@v5
1616
with:
1717
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
1818
key: ${{ github.job }}-yarn-${{ hashFiles('yarn.lock') }}
1919
- name: Restore node_modules
20-
uses: actions/cache@v3
20+
uses: actions/cache@v5
2121
with:
2222
path: ./node_modules
2323
key: ${{ github.job }}-node-modules-${{ hashFiles('yarn.lock') }}

.github/workflows/build-native-scanner.yml

Lines changed: 0 additions & 332 deletions
This file was deleted.

0 commit comments

Comments
 (0)