diff --git a/.github/workflows/flutter-pages.yml b/.github/workflows/flutter-pages.yml index 9bc7a04..4782a70 100644 --- a/.github/workflows/flutter-pages.yml +++ b/.github/workflows/flutter-pages.yml @@ -1,7 +1,7 @@ name: Flutter web on GitHub Pages -# Reusable: serves the newest release at the site root, the newest public beta -# under /beta/. Release runs deploy from their tag: allow the tag rule "*". +# Reusable: serves the newest release at the site root, the newest build of +# any kind under /beta/. Release runs deploy from their tag: allow the tag rule "*". on: workflow_call: @@ -28,11 +28,10 @@ jobs: GH_TOKEN: ${{ github.token }} BASE_PATH: ${{ steps.pages.outputs.base_path }} run: | - # Releases and public betas (labels beta, rc) with a web build, newest - # first, as " ". + # Releases and pre-releases with a web build, newest first, as + # " ". gh api --paginate "repos/$GITHUB_REPOSITORY/releases" --jq '.[] | select((.draft | not) and any(.assets[]; .name | endswith("-web.zip"))) - | select((.prerelease | not) or (.tag_name | test("-(beta|rc)[.-]?[1-9][0-9]?$"; "i"))) | "\(.tag_name) \(.prerelease)"' > releases.txt beta=$(awk 'NR == 1 { print $1 }' releases.txt) prod=$(awk '$2 == "false" { print $1; exit }' releases.txt) diff --git a/.github/workflows/flutter-release.yml b/.github/workflows/flutter-release.yml index fb11318..21231db 100644 --- a/.github/workflows/flutter-release.yml +++ b/.github/workflows/flutter-release.yml @@ -1,7 +1,7 @@ name: Flutter release # Reusable: builds a release of a Flutter app and publishes it to the stores -# and Pages; the tag picks the testers (see README.md). +# and Pages; a pre-release goes to open testing, a release to production. on: workflow_call: @@ -31,12 +31,8 @@ on: description: API name of the Google Play open testing track; Google names it `beta`, and other names are closed tracks. type: string default: beta - play-alpha-track: - description: API name of the Google Play closed testing track that gets the alpha pre-releases. - type: string - default: alpha publish-track: - description: "Manual runs from a release's tag: the Google Play track to publish to; it also picks the iOS testers." + description: "Manual runs from a release's tag: `production` or the open testing track (play-beta-track)." type: string publish-platforms: description: "Manual runs: `all` (the default), `android` or `ios`." @@ -99,7 +95,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: - contents: read # check the version's other tags + contents: read # check the release's builds and the version's other tags outputs: mode: ${{ steps.version.outputs.mode }} manual: ${{ steps.version.outputs.manual }} @@ -124,7 +120,7 @@ jobs: TRACK: ${{ inputs.publish-track }} PLATFORMS: ${{ inputs.publish-platforms }} BETA_TRACK: ${{ inputs.play-beta-track }} - ALPHA_TRACK: ${{ inputs.play-alpha-track }} + PREFIX: ${{ inputs.artifact-prefix }} GH_TOKEN: ${{ github.token }} run: | case "$EVENT/$REF_TYPE" in @@ -138,23 +134,17 @@ jobs: exit 1 ;; esac - # [v]X.Y.Z, or [v]X.Y.Z-