Skip to content

Commit fcffa6e

Browse files
committed
Merge branch 'main-dev'
2 parents 3f224c3 + d9bc3d2 commit fcffa6e

File tree

1 file changed

+51
-53
lines changed

1 file changed

+51
-53
lines changed

.github/workflows/release.yml

Lines changed: 51 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ jobs:
5656
uses: actions/checkout@v4
5757
with:
5858
fetch-depth: 0
59-
6059
- name: Perform rebase
6160
run: |
6261
git fetch origin main
6362
git checkout main-dev
6463
git rebase origin/main
65-
6664
- name: Push changes
6765
uses: CasperWA/push-protected@v2
6866
with:
@@ -350,12 +348,8 @@ jobs:
350348
strategy:
351349
fail-fast: false
352350
matrix:
353-
arch:
354-
- x64
355-
- x86
356-
os:
357-
- macos-latest
358-
- ubuntu-22.04
351+
arch: [x64, x86]
352+
os: [macos-latest, ubuntu-22.04]
359353
exclude:
360354
- arch: x86
361355
os: macos-latest
@@ -365,100 +359,104 @@ jobs:
365359
env:
366360
CC: gcc-12
367361
CXX: g++-12
368-
369362
steps:
370-
- name: Checkout the latest code
363+
- name: Checkout Repository
371364
uses: actions/checkout@v4
372365
with:
373366
ref: "main"
374-
- run: git submodule update --init --recursive
375-
376-
- name: Set up Node.js
367+
- name: Update Git Submodules
368+
run: git submodule update --init --recursive
369+
- name: Set Up Node.js
377370
uses: actions/setup-node@v4
378371
with:
379-
node-version: 20
372+
node-version: "20"
380373
architecture: ${{ matrix.arch }}
381-
382-
- name: Update compilers
374+
- name: Update System Compilers (Ubuntu Only)
383375
if: matrix.os == 'ubuntu-22.04'
384376
run: |
377+
echo "Updating compilers and installing build dependencies on Ubuntu"
385378
sudo apt update
386379
sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12
387-
sudo apt install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
388-
389-
- run: npm ci --ignore-scripts
390-
- run: npm run prebuild-single
380+
sudo apt install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
381+
- name: Install Node.js Dependencies
382+
run: npm ci --ignore-scripts
383+
- name: Prebuild Native Modules (Linux / Non-Darwin)
391384
if: matrix.os != 'macos-latest'
392-
- run: npm run prebuild-darwin-x64+arm64
385+
run: npm run prebuild-single
386+
- name: Prebuild Native Modules for macOS
387+
if: matrix.os == 'macos-latest'
393388
env:
394389
CC: clang
395390
CXX: clang++
391+
run: npm run prebuild-darwin-x64+arm64
392+
- name: Validate macOS Prebuild Artifacts
396393
if: matrix.os == 'macos-latest'
397-
- run: file prebuilds/*/*
398-
if: matrix.os == 'macos-latest'
399-
- name: Extra for cross build
394+
run: file prebuilds/*/*
395+
- name: Cross-Build for ARM64 on Ubuntu
400396
if: matrix.os == 'ubuntu-22.04'
401397
run: npm run prebuild-arm64
402-
- uses: actions/upload-artifact@v3
398+
- name: Upload Prebuild Artifacts
399+
uses: actions/upload-artifact@v4
403400
with:
404401
name: prebuilds
405402
path: prebuilds
406403
retention-days: 1
407404

408405
publish_javascript:
409-
name: Publish JavaScript
406+
name: Publish JavaScript Package
410407
needs: build_javascript
411408
runs-on: ubuntu-22.04
412-
413409
steps:
414-
- uses: actions/checkout@v4
410+
- name: Checkout Repository
411+
uses: actions/checkout@v4
415412
with:
416413
ref: "main"
417-
- run: git submodule update --init --recursive
418-
419-
- name: Set up Node.js
414+
- name: Update Git Submodules
415+
run: git submodule update --init --recursive
416+
- name: Set Up Node.js Environment
420417
uses: actions/setup-node@v4
421418
with:
422-
node-version: 20
423-
424-
- uses: actions/download-artifact@v3
425-
426-
- name: Look for links
419+
node-version: "20"
420+
- name: Download Prebuild Artifacts
421+
uses: actions/download-artifact@v4
422+
with:
423+
name: prebuilds
424+
path: prebuilds
425+
- name: Verify File Hard Links (Optional)
427426
run: find . -type f -links +1
428-
429-
- name: Install dependencies
427+
- name: Install Node.js Dependencies
430428
run: npm ci --ignore-scripts
431-
432-
- name: Build the JS from TS
429+
- name: Build JavaScript from TypeScript
433430
run: npm run build-js
434-
435-
- name: Last minute test with prebuild artifact
431+
- name: Run Final Tests with Prebuild Artifacts
436432
run: npm run test
437-
438-
- name: Publish Dry Run
439-
run: npm publish --dry-run
433+
- name: Dry Run Publish to NPM
440434
if: github.ref != 'refs/heads/main'
441-
442-
- name: Publish
443-
uses: JS-DevTools/npm-publish@v3
435+
run: npm publish --dry-run
436+
- name: Publish to NPM
444437
if: github.ref == 'refs/heads/main'
438+
uses: JS-DevTools/npm-publish@v3
445439
with:
446440
token: ${{ secrets.NPM_TOKEN }}
447441
access: public
448442

449443
publish_rust:
450-
name: Publish Rust
444+
name: Publish Rust Crate
451445
needs: versioning
452446
runs-on: ubuntu-22.04
453447
steps:
454-
- uses: actions/checkout@v4
448+
- name: Checkout Repository
449+
uses: actions/checkout@v4
455450
with:
456451
ref: "main"
457-
- run: git submodule update --init --recursive
458-
- uses: actions-rs/toolchain@v1
452+
- name: Update Git Submodules
453+
run: git submodule update --init --recursive
454+
- name: Set Up Rust Toolchain
455+
uses: actions-rs/toolchain@v1
459456
with:
460457
toolchain: stable
461458
override: true
462-
- uses: katyo/publish-crates@v2
459+
- name: Publish Rust Crate to Registry
460+
uses: katyo/publish-crates@v2
463461
with:
464462
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)