Add support for compiling SEA #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build CLI | |
on: [push] | |
jobs: | |
build-ubuntu-x64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.x' | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build | |
- run: yarn run package | |
- run: cp $(command -v node) ndjson-downloader | |
- run: npx postject ndjson-downloader NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 | |
- name: Move Scripts | |
run: cp scripts/* . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndjson-downloader_linux_x64 | |
path: | | |
install.sh | |
install.zsh | |
install.fish | |
ndjson-downloader | |
README.md | |
LICENSE | |
- name: Compress Archive | |
run: zip ndjson-downloader_linux_x64.zip ndjson-downloader README.md LICENSE install.sh install.zsh install.fish | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Upload Release Artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ndjson-downloader_linux_x64.zip | |
build-macos-x64: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.x' | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build | |
- run: yarn run package | |
- run: cp $(command -v node) ndjson-downloader | |
- run: codesign --remove-signature ndjson-downloader | |
- run: npx postject ndjson-downloader NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --macho-segment-name NODE_SEA | |
- run: codesign --sign - ndjson-downloader | |
- name: Move Scripts | |
run: cp scripts/* . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndjson-downloader_macos_x64 | |
path: | | |
install.sh | |
install.zsh | |
install.fish | |
ndjson-downloader | |
README.md | |
LICENSE | |
- name: Compress Archive | |
run: zip ndjson-downloader_macos_x64.zip ndjson-downloader README.md LICENSE install.sh install.zsh install.fish | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Upload Release Artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ndjson-downloader_macos_x64.zip | |
build-macos-arm64: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.x' | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build | |
- run: yarn run package | |
- run: cp $(command -v node) ndjson-downloader | |
- run: codesign --remove-signature ndjson-downloader | |
- run: npx postject ndjson-downloader NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --macho-segment-name NODE_SEA | |
- run: codesign --sign - ndjson-downloader | |
- name: Move Scripts | |
run: cp scripts/* . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndjson-downloader_macos_arm64 | |
path: | | |
install.sh | |
install.zsh | |
install.fish | |
ndjson-downloader | |
README.md | |
LICENSE | |
- name: Compress Archive | |
run: zip ndjson-downloader_macos_arm64.zip ndjson-downloader README.md LICENSE install.sh install.zsh install.fish | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Upload Release Artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ndjson-downloader_macos_arm64.zip | |
build-windows-x64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.x' | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build | |
- run: yarn run package | |
- run: node -e "require('fs').copyFileSync(process.execPath, 'ndjson-downloader.exe')" | |
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | |
with: | |
sdk-version: 22621 | |
- run: '& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe" remove /s .\ndjson-downloader.exe' | |
- run: npx postject ndjson-downloader.exe NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 | |
- name: Move Scripts | |
run: cp scripts/* . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndjson-downloader_windows_x64 | |
path: | | |
install.bat | |
install.ps1 | |
ndjson-downloader.exe | |
README.md | |
LICENSE | |
- name: Compress Archive | |
run: Compress-Archive -Path ".\ndjson-downloader.exe", ".\README.md", ".\LICENSE", ".\install.bat", ".\install.ps1" ndjson-downloader_windows_x64.zip | |
if: startsWith(github.ref, 'refs/tags/') | |
- name: Upload Release Artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ndjson-downloader_windows_x64.zip | |