diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9864cfa..d417cbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,9 @@ jobs: runs-on: ubuntu-24.04 outputs: version: ${{ steps.v.outputs.version }} + version_code: ${{ steps.release_intent.outputs.version_code }} + android: ${{ steps.release_intent.outputs.android }} + intent: ${{ steps.release_intent.outputs.intent }} steps: - uses: actions/checkout@v7 - id: v @@ -29,6 +32,17 @@ jobs: exit 1 fi echo "version=${version}" >> "${GITHUB_OUTPUT}" + - uses: actions/setup-python@v6 + with: + python-version: "3.12" + - id: release_intent + name: Validate notes and classify Android release intent + run: | + if [[ "${GITHUB_REF_TYPE}" != "tag" ]]; then + # Manual runs build every platform and therefore always require current notes. + python3 -I androidApp/scripts/check_release_notes.py require-current --repo-root . + fi + python3 -I androidApp/scripts/check_release_notes.py ci-intent --repo-root . >> "${GITHUB_OUTPUT}" linux: needs: version @@ -131,6 +145,7 @@ jobs: android: needs: version + if: needs.version.outputs.android == 'true' runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 @@ -177,7 +192,14 @@ jobs: publish: needs: [version, linux, flatpak, windows, macos, android] - if: github.ref_type == 'tag' + if: >- + ${{ always() && github.ref_type == 'tag' && + needs.version.result == 'success' && + needs.linux.result == 'success' && + needs.flatpak.result == 'success' && + needs.windows.result == 'success' && + needs.macos.result == 'success' && + (needs.android.result == 'success' || needs.android.result == 'skipped') }} runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 diff --git a/androidApp/scripts/release.sh b/androidApp/scripts/release.sh index 30badc5..4d43d2b 100755 --- a/androidApp/scripts/release.sh +++ b/androidApp/scripts/release.sh @@ -8,6 +8,7 @@ # The key comes from the environment or from ~/.config/chesspenguin/android/.env. set -euo pipefail cd "$(dirname "$0")/.." +python3 scripts/check_release_notes.py require-current --repo-root .. env_file="${CP_SIGNING_ENV:-$HOME/.config/chesspenguin/android/.env}" if [[ -z "${CP_KEYSTORE:-}" && -f "${env_file}" ]]; then set -a