Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ['main']
|
|
paths-ignore: ['*.md']
|
|
pull_request:
|
|
paths-ignore: ['*.md']
|
|
branches: ['main']
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Free up disk space
|
|
uses: start9labs/shared-workflows/.github/actions/free-disk-space@master
|
|
if: false # enable if image gets large
|
|
|
|
- name: Setup build environment
|
|
uses: start9labs/shared-workflows/.github/actions/setup-build-env@master
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Find or create developer signing key
|
|
run: |
|
|
if [ -n "${{ secrets.DEV_KEY }}" ]; then
|
|
mkdir -p ~/.startos
|
|
printf '%s' "${{ secrets.DEV_KEY }}" > ~/.startos/developer.key.pem
|
|
else
|
|
start-cli init-key
|
|
fi
|
|
shell: bash
|
|
|
|
- name: Build JS bundle
|
|
run: |
|
|
npm ci
|
|
npm run check
|
|
npm run build
|
|
mkdir -p assets
|
|
shell: bash
|
|
|
|
- name: Build the service packages
|
|
run: |
|
|
RUST_LOG=debug RUST_BACKTRACE=1 make
|
|
echo ""
|
|
echo "SHA256SUMs:"
|
|
sha256sum *.s9pk
|
|
shell: bash
|
|
|
|
- name: Upload each s9pk as its own artifact
|
|
uses: start9labs/shared-workflows/.github/actions/upload-each@master
|
|
with:
|
|
pattern: "*.s9pk"
|
|
retention-days: 14
|
|
compression-level: 0
|