mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 18:29:07 +00:00
164 lines
4.6 KiB
YAML
164 lines
4.6 KiB
YAML
name: Build Binaries
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- daniel/infisical-binary
|
|
pull_request:
|
|
branches:
|
|
- daniel/infisical-binary
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target: ["node16-linux-x64", "node16-linux-x86", "node16-linux-armv7", "node16-linux-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-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/
|