Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Push stable release tags with ente-ci

Manav Rathic1c91b077935
diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.yml
index 18762b6297..5205960c7e 100644
--- a/.github/workflows/app-release.yml
+++ b/.github/workflows/app-release.yml
@@ -97,7 +97,7 @@ jobs:
node .github/scripts/app-version.mjs "${APP}" "$@"
}
- git_push_release_branch() {
+ git_push_with_app_token() {
git -c http.https://github.com/.extraheader= push \
"https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"
}
@@ -128,7 +128,7 @@ jobs:
last_run="$(GH_TOKEN="${RUNS_TOKEN}" gh api "/repos/${GITHUB_REPOSITORY}/actions/workflows/${APP}-build.yml/runs?per_page=1" --jq '.workflow_runs[0].run_number // 0')"
app_version set-build-and-commit "${VERSION}" "$((build_base + last_run + 1))"
fi
- git_push_release_branch "${release_branch}"
+ git_push_with_app_token "${release_branch}"
gh release delete "${beta_tag}" --yes --cleanup-tag --repo ente/nightly || true
git push origin ":refs/tags/${beta_tag}" || true
@@ -158,7 +158,7 @@ jobs:
node .github/scripts/app-version.mjs "${APP}" "$@"
}
- git_push_release_branch() {
+ git_push_with_app_token() {
git -c http.https://github.com/.extraheader= push \
"https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"
}
@@ -183,7 +183,7 @@ jobs:
fi
git tag "photos-desktop-v${VERSION}" "${release_sha}"
- git push origin "refs/tags/photos-desktop-v${VERSION}"
+ git_push_with_app_token "refs/tags/photos-desktop-v${VERSION}"
git clone --depth 1 "https://x-access-token:${GH_TOKEN}@github.com/ente/photos-desktop.git" photos-desktop
git -C photos-desktop commit --allow-empty -m "v${VERSION}"
@@ -191,7 +191,7 @@ jobs:
gh release edit "v${VERSION}" --repo ente/photos-desktop --draft=false --prerelease=false --latest
gh release delete "photos-desktop-v${VERSION}-rc" --yes --cleanup-tag --repo ente/nightly || true
- git_push_release_branch ":refs/heads/${release_branch}"
+ git_push_with_app_token ":refs/heads/${release_branch}"
git push origin ":refs/tags/photos-desktop-v${VERSION}-rc" || true
exit 0
fi
@@ -219,12 +219,12 @@ jobs:
fi
git tag "${final_tag}" "${release_sha}"
- git push origin "refs/tags/${final_tag}"
+ git_push_with_app_token "refs/tags/${final_tag}"
gh release edit "${rc_tag}" --tag "${final_tag}" --title "${final_tag}" --target "${release_sha}" --draft=false --prerelease=false --verify-tag
git push origin ":refs/tags/${rc_tag}" || true
gh release delete "${rc_tag}" --yes --cleanup-tag --repo ente/nightly || true
- git_push_release_branch ":refs/heads/${release_branch}"
+ git_push_with_app_token ":refs/heads/${release_branch}"
sync-docs:
needs: release