-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
strategy: | ||
matrix: | ||
node: [12, 14, 15, 16] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
os: [ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2016, windows-2019] | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
|
@@ -25,7 +25,7 @@ jobs: | |
id: cache-restore | ||
with: | ||
path: node_modules | ||
key: ${{ matrix.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }} | ||
key: ${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }} | ||
- name: Install Dependencies if Cache Miss | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
run: yarn --frozen-lockfile | ||
|
@@ -44,6 +44,45 @@ jobs: | |
with: | ||
path: 'build/stage/**/*.tar.gz' | ||
|
||
PrebuildMusl: | ||
name: Publish Musl Binary | ||
runs-on: ubuntu-latest | ||
container: | ||
image: node:${{ matrix.node }}-alpine | ||
strategy: | ||
matrix: | ||
node: [12, 14, 15, 16] | ||
steps: | ||
- name: Setup env with Node v${{ matrix.node }} | ||
run: | | ||
apk add --update | ||
apk add --no-cache ca-certificates git curl build-base python3 g++ make | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- name: Restore CI Cache | ||
uses: actions/[email protected] | ||
id: cache-restore | ||
with: | ||
path: node_modules | ||
key: musl-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install Dependencies if Cache Miss | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
run: yarn --frozen-lockfile | ||
- name: Build and package code | ||
run: yarn gyp:prebuild | ||
- name: Store prebuild | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: prebuilt-musl-${{ matrix.node }}.tar.gz | ||
path: build/stage/**/*.tar.gz | ||
if-no-files-found: error | ||
- name: Publish Binaries | ||
uses: icrawl/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
path: 'build/stage/**/*.tar.gz' | ||
|
||
Crosspost: | ||
name: Release Crosspost | ||
runs-on: ubuntu-latest | ||
|
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