π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add an update action for app release candidates
Manav Rathid4071acbe99b
diff --git a/.github/docs/app-release.md b/.github/docs/app-release.mdindex a596eecfe9..2b4baa1099 100644--- a/.github/docs/app-release.md+++ b/.github/docs/app-release.md@@ -46,15 +46,27 @@ The workflow also opens a PR to move `main` to `0.1.17-beta`. Merge that PR afte## Update the RC if needed-Cherry pick fixes to the release branch and push to replace the current RC. For release branches the build number does not auto increment and needs to be manually incremented.+Run the update action with the full SHA of the fix to cherry-pick a commit into the release branch and create a new RC build.```sh-git switch release/ensu-v0.1.16-git cherry-pick <fix-sha>-node .github/scripts/app-version.mjs ensu bump-build-and-commit-git push+gh workflow run app-release.yml \+ -f action=update \+ -f app=ensu \+ -f version=0.1.16 \+ -f commit="<fix-sha>"```+Conflicts stop the workflow before pushing.++> To do this manually:+>+> ```sh+> git switch release/ensu-v0.1.16+> git cherry-pick <fix-sha>+> node .github/scripts/app-version.mjs ensu bump-build-and-commit+> git push+> ```+## Promote release> [!IMPORTANT]diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.ymlindex 2815a500c4..c44b4b6dfb 100644--- a/.github/workflows/app-release.yml+++ b/.github/workflows/app-release.yml@@ -22,11 +22,16 @@ on:type: choiceoptions:- start+ - update- promoteversion:description: "Release version, e.g. 0.1.16"required: truetype: string+ commit:+ description: "Full commit SHA to cherry-pick (required for update)"+ required: false+ type: stringpermissions:actions: read@@ -45,6 +50,7 @@ jobs:env:APP: ${{ inputs.app }}VERSION: ${{ inputs.version }}+ COMMIT: ${{ inputs.commit }}steps:- name: Validate version input@@ -55,6 +61,15 @@ jobs:exit 1fi+ - name: Validate commit input+ if: inputs.action == 'update'+ shell: bash+ run: |+ if [[ ! "${COMMIT}" =~ ^[0-9a-fA-F]{40}$ ]]; then+ echo "::error::commit must be a full 40-character SHA"+ exit 1+ fi+- name: Checkout mainif: inputs.action == 'start'uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1@@ -62,7 +77,7 @@ jobs:ref: main- name: Checkout release branch- if: inputs.action == 'promote'+ if: inputs.action == 'update' || inputs.action == 'promote'uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1with:ref: release/${{ inputs.app }}-v${{ inputs.version }}@@ -150,6 +165,20 @@ jobs:gh pr create --base main --head "${next_branch}" --title "[${APP}] Start ${APP^} ${next_version}" --body ""+ - name: Update release+ if: inputs.action == 'update'+ env:+ GH_TOKEN: ${{ steps.app_token.outputs.token }}+ run: |+ set -euo pipefail++ git fetch --no-tags --depth=2 origin "${COMMIT}"+ git cherry-pick -x FETCH_HEAD+ node .github/scripts/app-version.mjs "${APP}" bump-build-and-commit+ git -c http.https://github.com/.extraheader= push \+ "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \+ "HEAD:refs/heads/release/${APP}-v${VERSION}"+- name: Promote releaseif: inputs.action == 'promote'env: