2023-10-07 03:51:31 +00:00
|
|
|
name: Publish prebuild
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- stable
|
|
|
|
paths:
|
|
|
|
- packages/**
|
|
|
|
- locales/**
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2023-10-07 13:00:39 +00:00
|
|
|
build_binaries:
|
|
|
|
name: Build & ship binaries
|
2023-10-07 03:51:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [20.x]
|
|
|
|
python-version: [3.11.x]
|
|
|
|
if: github.repository == 'transfem-org/Sharkey'
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out the repo
|
|
|
|
uses: actions/checkout@v4.1.0
|
2023-10-07 13:16:36 +00:00
|
|
|
with:
|
|
|
|
lfs: true
|
|
|
|
submodules: 'recursive'
|
2023-10-07 03:51:31 +00:00
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v4.7.1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Cache APT Packages
|
|
|
|
uses: awalsh128/cache-apt-pkgs-action@v1.3.0
|
|
|
|
with:
|
2023-10-07 13:42:39 +00:00
|
|
|
packages: "build-essential binfmt-support qemu-user-static ffmpeg tini curl libjemalloc-dev libjemalloc2 uuid-dev libx11-dev libxkbfile-dev execstack libgconf-2-4 libsecret-1-dev"
|
2023-10-07 03:51:31 +00:00
|
|
|
|
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: v1-npm-deps-
|
|
|
|
|
2023-10-07 13:42:39 +00:00
|
|
|
- uses: MOZGIII/install-ldid-action@v1
|
|
|
|
with:
|
|
|
|
tag: v2.1.5-procursus2
|
|
|
|
|
2023-10-07 03:51:31 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-10-07 13:00:39 +00:00
|
|
|
corepack enable
|
|
|
|
corepack prepare pnpm@latest --activate
|
2023-10-07 03:51:31 +00:00
|
|
|
pnpm install
|
|
|
|
npm install -g pkg
|
2023-10-07 14:06:19 +00:00
|
|
|
npm install -g rollup
|
2023-10-07 03:51:31 +00:00
|
|
|
pnpm run build
|
|
|
|
cd packages/backend
|
2023-10-07 14:06:19 +00:00
|
|
|
mkdir dist
|
|
|
|
rollup ./built/boot/entry.js --file ./dist/bundle.js --format cjs
|
2023-10-07 14:06:49 +00:00
|
|
|
pkg --debug --public ./dist/bundle.js --targets latest-linuxstatic-x64,latest-linuxstatic-arm64,latest-macos-x64,latest-macos-arm64,latest-win-x64
|
2023-10-07 13:00:39 +00:00
|
|
|
ls
|