mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Update build-binaries.yml
This commit is contained in:
151
.github/workflows/build-binaries.yml
vendored
151
.github/workflows/build-binaries.yml
vendored
@@ -9,12 +9,19 @@ on:
|
|||||||
- daniel/infisical-binary
|
- daniel/infisical-binary
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: ["node16-linux-x64", "node16-linux-x86", "node16-linux-armv7", "node16-linux-arm64"]
|
arch:
|
||||||
|
- x64
|
||||||
|
- arm64
|
||||||
|
node-version:
|
||||||
|
- 18
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- macos
|
||||||
|
- win
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
@@ -26,7 +33,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Install dependencies (backend)
|
- name: Install dependencies (backend)
|
||||||
run: npm install
|
run: npm install
|
||||||
@@ -37,127 +44,19 @@ jobs:
|
|||||||
- name: Prerequisites for pkg
|
- name: Prerequisites for pkg
|
||||||
run: npm run binary:build
|
run: npm run binary:build
|
||||||
|
|
||||||
- name: Build binary
|
- name: Package into node binary
|
||||||
run: npx pkg --no-bytecode --public-packages "*" --targets ${{matrix.target}} .
|
uses: lando/pkg-action@v2
|
||||||
|
id: pkg
|
||||||
|
with:
|
||||||
|
entrypoint: dist/main.js
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
upload: false
|
||||||
|
pkg: "pkg@5.8.1"
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: binaries-${{ matrix.target }}
|
name: ${{ steps.pkg.outputs.artifact-key }}
|
||||||
path: ./backend/binary/
|
path: ${{ steps.pkg.outputs.file }}
|
||||||
|
|
||||||
build-alpine:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: node:18-alpine
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target: ["node16-alpine-x64", "node16-alpine-x86", "node16-alpine-armv7", "node16-alpine-arm64"]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ./backend
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install dependencies (backend)
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Install dependencies (frontend)
|
|
||||||
run: npm install --prefix ../frontend
|
|
||||||
|
|
||||||
- name: Prerequisites for pkg
|
|
||||||
run: npm run binary:build
|
|
||||||
|
|
||||||
- name: Build binary
|
|
||||||
run: npx pkg --no-bytecode --public-packages "*" --targets ${{matrix.target}} .
|
|
||||||
|
|
||||||
- name: Upload binaries
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: binaries-${{ matrix.target }}
|
|
||||||
path: ./backend/binary/
|
|
||||||
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target:
|
|
||||||
[
|
|
||||||
"node16-macos-x64",
|
|
||||||
"node16-macos-arm64",
|
|
||||||
"node16-linuxstatic-x64",
|
|
||||||
"node16-linuxstatic-x86",
|
|
||||||
"node16-linuxstatic-armv7",
|
|
||||||
"node16-linuxstatic-arm64"
|
|
||||||
]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ./backend
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18.x
|
|
||||||
|
|
||||||
- name: Install dependencies (backend)
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Install dependencies (frontend)
|
|
||||||
run: npm install --prefix ../frontend
|
|
||||||
|
|
||||||
- name: Prerequisites for pkg
|
|
||||||
run: npm run binary:build
|
|
||||||
|
|
||||||
- name: Build binary
|
|
||||||
run: npx pkg --no-bytecode --public-packages "*" --targets ${{matrix.target}} .
|
|
||||||
|
|
||||||
- name: Upload binaries
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: binaries-${{ matrix.target }}
|
|
||||||
path: ./backend/binary/
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target: ["node16-win-x64", "node16-win-x86"]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ./backend
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18.x
|
|
||||||
|
|
||||||
- name: Install dependencies (backend)
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Install dependencies (frontend)
|
|
||||||
run: npm install --prefix ../frontend
|
|
||||||
|
|
||||||
- name: Prerequisites for pkg
|
|
||||||
run: npm run binary:build
|
|
||||||
|
|
||||||
- name: Build binary
|
|
||||||
run: npx pkg --no-bytecode --public-packages "*" --targets ${{matrix.target}} .
|
|
||||||
|
|
||||||
- name: Upload binaries
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: binaries-${{ matrix.target }}
|
|
||||||
path: ./backend/binary/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user