mirror of
https://github.com/storytold/deckcraft.git
synced 2026-12-01 18:55:56 +01:00
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch. Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
85 lines
3.9 KiB
YAML
85 lines
3.9 KiB
YAML
# Builds the unsigned Apple-silicon DeckCraft Nightly (packaging/macos/nightly.sh) on a hosted
|
|
# macOS runner and checks the archive as the Launcher unpacks it, ending with the bundle's version
|
|
# query (packaging/macos/nightly-verify.sh --expect unsigned). No secrets and no environment: the
|
|
# real Nightly is signed and notarized by the shared release-ref signer (craft-common-actions),
|
|
# which calls packaging/macos/nightly-sign.sh.
|
|
name: Nightly macOS build
|
|
|
|
on:
|
|
# macOS runners are shared with release builds: pull requests run this only with the `full-ci`
|
|
# label, never by changed paths. `labeled` so adding the label starts a run.
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# A newer push to a labelled PR cancels its older run. Any event that will not build (no `full-ci`
|
|
# label, or another label added) gets a group of its own, so it never cancels a real build.
|
|
concurrency:
|
|
group: nightly-macos-${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full-ci') && (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Nightly .app (aarch64, unsigned)
|
|
if: >-
|
|
github.event_name == 'workflow_dispatch' ||
|
|
(contains(github.event.pull_request.labels.*.name, 'full-ci') &&
|
|
(github.event.action != 'labeled' || github.event.label.name == 'full-ci'))
|
|
runs-on: macos-15
|
|
timeout-minutes: 90
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
RUST_BACKTRACE: 1
|
|
steps:
|
|
- name: Harden runner
|
|
uses: step-security/harden-runner@v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
# The release's pin (release.yml craft-fonts-ref), so the bundle's notices match a shipped build.
|
|
- name: Check out craft-fonts
|
|
uses: actions/checkout@v7.0.1
|
|
with:
|
|
repository: storytold/craft-fonts
|
|
ref: 37827adc41fd165f9a9234ac40f94dbad353aa69
|
|
path: craft-fonts
|
|
- name: Check out craft-i18n
|
|
uses: actions/checkout@v7.0.1
|
|
with:
|
|
repository: storytold/craft-i18n
|
|
path: craft-i18n
|
|
# The hosted image ships rustup: install the current stable plus the macOS target, with no new
|
|
# action pin for one job. Cargo enforces [workspace.package] rust-version.
|
|
- name: Install the Rust toolchain
|
|
run: rustup toolchain install stable --profile minimal --target aarch64-apple-darwin
|
|
|
|
# A version of the prepared Nightly form for this commit; the real one comes from the feed's
|
|
# identity job. Only nightly.sh's input checks read it.
|
|
- name: Prepare a Nightly identity for this commit
|
|
run: |
|
|
set -euo pipefail
|
|
base="$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["version"].split("-")[0])')"
|
|
sha="$(git rev-parse HEAD)"
|
|
date="$(date -u +%Y-%m-%d)"
|
|
{
|
|
echo "DECKCRAFT_BUILD_SHA=$sha"
|
|
echo "DECKCRAFT_BUILD_DATE=$date"
|
|
echo "DECKCRAFT_VERSION=$base-nightly.${date//-/}.$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT.g${sha:0:12}"
|
|
} >>"$GITHUB_ENV"
|
|
- name: Build the unsigned Nightly bundle
|
|
env:
|
|
DECKCRAFT_BUILD_CHANNEL: nightly-v1
|
|
CARGO_TARGET_DIR: ${{ runner.temp }}/nightly-targets
|
|
DIST: ${{ runner.temp }}/nightly-dist
|
|
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
|
|
CRAFT_FONTS_REQUIRED: "1"
|
|
run: bash packaging/macos/nightly.sh --arch aarch64
|
|
- name: Check the archive and the bundle's version
|
|
run: bash packaging/macos/nightly-verify.sh --expect unsigned --input "$RUNNER_TEMP/nightly-dist/deckcraft-$DECKCRAFT_VERSION-macos-aarch64-nightly.zip"
|