Pass ALKANE_EMBEDDED_TOKEN (a repo Actions secret, a restricted read-only token scoped to the alkane-os repo) into the release and candidate workflow builds, so the published GUI can list the private alkane-os releases in its install picker with no user setup. The source tree carries no secret (option_env!); the value lives only in CI-built binaries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
169 lines
6.6 KiB
YAML
169 lines
6.6 KiB
YAML
name: next-build
|
|
|
|
on:
|
|
push:
|
|
branches: [next]
|
|
|
|
concurrency:
|
|
group: alkane-toolkit-next
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
# Windows build of the candidate (see release.yml's windows job); the
|
|
# candidate job attaches its zip next to the Linux tarball.
|
|
windows:
|
|
runs-on: alkane-ci
|
|
container:
|
|
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5
|
|
env:
|
|
CARGO_TARGET_DIR: target
|
|
CARGO_BUILD_JOBS: 2
|
|
WX_WINDOWS_PREFIX: /root/.cache/wx-3.3.3-mingw
|
|
ALKANE_EMBEDDED_TOKEN: ${{ secrets.ALKANE_EMBEDDED_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Select candidate version
|
|
id: version
|
|
run: bash ci/compute-rc-version.sh >> "$GITHUB_OUTPUT"
|
|
- name: Install Windows toolchain
|
|
if: steps.version.outputs.release == 'true'
|
|
run: bash ci/windows-ci.sh toolchain
|
|
- name: Configure bounded Rust compiler cache
|
|
if: steps.version.outputs.release == 'true'
|
|
run: bash ci/configure-rust-cache.sh
|
|
- name: Compute wxMSW cache key
|
|
if: steps.version.outputs.release == 'true'
|
|
id: wx-key
|
|
run: bash ci/wx-cache-key.sh windows
|
|
- name: Check prebuilt wxMSW
|
|
if: steps.version.outputs.release == 'true'
|
|
id: wx-image
|
|
run: bash ci/check-wx-image-prefix.sh windows
|
|
- id: wx-cache
|
|
if: steps.version.outputs.release == 'true' && steps.wx-image.outputs.available != 'true'
|
|
uses: actions/cache/restore@v4
|
|
continue-on-error: true
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-mingw
|
|
key: ${{ steps.wx-key.outputs.key }}
|
|
- name: Build wxMSW
|
|
if: steps.version.outputs.release == 'true'
|
|
id: wx-build
|
|
run: bash ci/ensure-wx-prefix.sh windows
|
|
- name: Save vendored wxMSW build
|
|
if: steps.version.outputs.release == 'true' && steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true'
|
|
uses: actions/cache/save@v4
|
|
continue-on-error: true
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-mingw
|
|
key: ${{ steps.wx-key.outputs.key }}
|
|
- name: Build Windows candidate
|
|
if: steps.version.outputs.release == 'true'
|
|
run: bash ci/windows-ci.sh build
|
|
- name: Sign Windows candidate (Azure Artifact Signing)
|
|
if: steps.version.outputs.release == 'true'
|
|
env:
|
|
AZURE_SIGNING_PROFILE: ${{ vars.AZURE_SIGNING_PROFILE }}
|
|
AZURE_SIGNING_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
|
|
AZURE_SIGNING_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
|
|
AZURE_SIGNING_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
|
|
run: bash ci/windows-ci.sh sign
|
|
- name: Package Windows candidate
|
|
if: steps.version.outputs.release == 'true'
|
|
run: bash ci/windows-ci.sh package "${{ steps.version.outputs.version }}"
|
|
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
if: steps.version.outputs.release == 'true'
|
|
with:
|
|
name: alkane-toolkit-windows
|
|
path: dist/alkane-toolkit-v*-windows-x86_64.zip
|
|
- name: Clean generated Toolkit build
|
|
if: always()
|
|
run: python3 ci/cleanup-generated.py
|
|
|
|
candidate:
|
|
needs: windows
|
|
runs-on: alkane-ci
|
|
container:
|
|
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5
|
|
env:
|
|
CARGO_TARGET_DIR: target
|
|
CARGO_BUILD_JOBS: 2
|
|
WX_PREFIX: /root/.cache/wx-3.3.3-linux
|
|
WX_RS_WXCONFIG: /root/.cache/wx-3.3.3-linux/bin/wx-config
|
|
ALKANE_EMBEDDED_TOKEN: ${{ secrets.ALKANE_EMBEDDED_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check runner image pins
|
|
run: python3 ci/check-runner-image.py
|
|
- name: Install build dependencies
|
|
run: bash ci/ensure-build-deps.sh base
|
|
- name: Configure bounded Rust compiler cache
|
|
run: bash ci/configure-rust-cache.sh
|
|
- name: Compute wxWidgets cache key
|
|
id: wx-key
|
|
run: bash ci/wx-cache-key.sh
|
|
- name: Check prebuilt wxWidgets
|
|
id: wx-image
|
|
run: bash ci/check-wx-image-prefix.sh
|
|
- id: wx-cache
|
|
if: steps.wx-image.outputs.available != 'true'
|
|
uses: actions/cache/restore@v4
|
|
continue-on-error: true
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-linux
|
|
key: ${{ steps.wx-key.outputs.key }}
|
|
- name: Build wxWidgets
|
|
id: wx-build
|
|
run: bash ci/ensure-wx-prefix.sh
|
|
- name: Save vendored wxWidgets build
|
|
if: steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true'
|
|
uses: actions/cache/save@v4
|
|
continue-on-error: true
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-linux
|
|
key: ${{ steps.wx-key.outputs.key }}
|
|
- name: Build release candidate
|
|
run: cargo build --release -p alkane-gui -p alkane-artifacts -p alkane-flash -p alkane-cli --offline
|
|
- name: Select candidate version
|
|
id: version
|
|
run: bash ci/compute-rc-version.sh >> "$GITHUB_OUTPUT"
|
|
- name: Package candidate
|
|
if: steps.version.outputs.release == 'true'
|
|
run: |
|
|
mkdir -p dist
|
|
cp target/release/alkane-toolkit dist/
|
|
tar -C dist -czf "dist/alkane-toolkit-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz" alkane-toolkit
|
|
- name: Fetch Windows candidate
|
|
if: steps.version.outputs.release == 'true'
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: alkane-toolkit-windows
|
|
path: dist/windows
|
|
- name: Create private prerelease
|
|
if: steps.version.outputs.release == 'true'
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
V="${{ steps.version.outputs.version }}"
|
|
WIN="dist/windows/alkane-toolkit-v${V}-windows-x86_64.zip"
|
|
[ -s "$WIN" ] || { echo "Windows candidate for ${V} is missing" >&2; exit 1; }
|
|
python3 ci/release-rc.py "${{ steps.version.outputs.tag }}" true \
|
|
"dist/alkane-toolkit-${V}-linux-x86_64.tar.gz" "$WIN"
|
|
- name: Rust compiler cache statistics
|
|
if: always()
|
|
run: |
|
|
if [ -n "${SCCACHE_DIR:-}" ]; then
|
|
sccache --show-stats
|
|
fi
|
|
- name: Clean generated Toolkit build
|
|
if: always()
|
|
run: python3 ci/cleanup-generated.py
|