diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 4d904e619f..c50a301ecf 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -1,11 +1,9 @@ name: Update Changelog +# Manual only: promote.yml stamps the released section at release time on its +# own. Dispatch this to refresh the [Unreleased] section between releases. on: - push: - branches: - - main - paths-ignore: - - 'CHANGELOG.md' + workflow_dispatch: permissions: contents: write @@ -18,6 +16,9 @@ concurrency: jobs: update-changelog: + # The content comes from main whatever ref was dispatched; refuse the rest so a + # stale-branch dispatch cannot open a PR built against a different tip. + if: github.ref == 'refs/heads/main' # ubuntu-slim: git + gh + coreutils + stdlib python3 is the whole toolchain here. Note this job checks out # full history below and slim is single-CPU, so the clone is slower than on a VM — and # slim's 15-minute platform cap is hard, matching the timeout already set here. A run that @@ -37,6 +38,8 @@ jobs: # Find the latest production tag (vX.Y.Z) PROD=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1) echo "prod=${PROD:-}" >> "$GITHUB_OUTPUT" + # The tip of the checked-out main; github.sha is the dispatched ref's tip. + echo "head=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" if [ -z "$PROD" ]; then echo "No production tag found. Skipping." @@ -83,7 +86,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} REPO: ${{ github.repository }} - HEAD_SHA: ${{ github.sha }} + HEAD_SHA: ${{ steps.tags.outputs.head }} PROD_TAG: ${{ steps.tags.outputs.prod }} INTERNAL_TAG: ${{ steps.tags.outputs.internal }} CLOSED_TAG: ${{ steps.tags.outputs.closed }} @@ -284,7 +287,7 @@ jobs: else gh pr create \ --title "docs: update CHANGELOG.md" \ - --body "Automated changelog update from push to main." \ + --body "Automated changelog refresh, dispatched from main." \ --head "$BRANCH" \ --base main \ --label "automation" \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 22d57ef09c..6405211d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog All notable changes to this project will be documented in this file. -The `[Unreleased]` section is automatically updated on every push to `main`. +The `[Unreleased]` section is refreshed by running the `Update Changelog` workflow by hand; +a production release stamps its own section here automatically. See [GitHub Releases](https://github.com/meshtastic/Meshtastic-Android/releases) for the full history. diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 39b335173e..9995088c0a 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -18,7 +18,7 @@ The entire release process is managed by a single GitHub Action: **`Create or Pr already in flight. Internal releases and dry runs are exempt (Play internal testing skips full review). - **Automation:** The workflow handles everything automatically: - - **Generates Changelog:** Categorizes merged PRs by their labels (per `.github/release.yml`) into GitHub's auto-generated release notes; a separate automation workflow opens a PR to fold the same notes into `CHANGELOG.md`. + - **Generates Changelog:** Categorizes merged PRs by their labels (per `.github/release.yml`) into GitHub's auto-generated release notes; a production release also opens a PR folding the same notes into `CHANGELOG.md`. Between releases that file is only refreshed by dispatching the `Update Changelog` workflow by hand. - **Tags & Builds** *(internal releases)*: Pushes the incremental tag first — there is no lint/test gate in this workflow, that's the separate PR/CI pipeline — then builds the Android bundle/APK and Desktop installers from that tag; if the build fails, an automatic cleanup job deletes the tag so a retry starts clean. Promotions skip this entirely and retag the already-built artifact (see below). - **Deploys Android:** Uploads the build to the correct Google Play track and attaches artifacts (`.aab`/`.apk`) to a GitHub Release. - **Deploys Desktop** *(internal releases)*: Builds native installers (DMG, MSI, EXE, DEB, RPM, AppImage) and Flatpak sources on a matrix of runners and attaches them to the GitHub Release.