mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
nightly.yml takes the artifacts of the newest commit on main that has a complete run of android.yml and apple.yml, and replaces the "nightly" pre-release with them. It stops when main has no new commits. A hung test does not stop it: the release APK comes from the release job, which runs no tests, and the release lists each file that is missing. apple.yml now also builds the iOS app for a device, not signed, on main (DModem-unsigned.ipa). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRR6tKgobV4RbMTv4eL
23 lines
736 B
Bash
Executable File
23 lines
736 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# nightly-publish.sh SHA NOTES DIR
|
|
#
|
|
# Replaces the "nightly" pre-release with a new one: its tag at SHA, its
|
|
# text from the file NOTES, its files all the files in DIR.
|
|
#
|
|
# It needs GH_TOKEN and GH_REPO.
|
|
set -euo pipefail
|
|
|
|
sha=$1 notes=$2 dir=$3
|
|
shopt -s nullglob
|
|
files=("$dir"/*)
|
|
[ ${#files[@]} -gt 0 ] || { echo "::error::No files to publish in $dir"; exit 1; }
|
|
|
|
gh release delete nightly --yes --cleanup-tag 2>/dev/null || true
|
|
# (a tag that has no release)
|
|
gh api -X DELETE "repos/$GH_REPO/git/refs/tags/nightly" 2>/dev/null || true
|
|
|
|
gh release create nightly "${files[@]}" \
|
|
--prerelease --latest=false --target "$sha" \
|
|
--title "Nightly build ($(date -u +%Y-%m-%d), ${sha:0:7})" \
|
|
--notes-file "$notes"
|