mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
ci: improve release cleanup and optimize build tasks (#4724)
This commit is contained in:
parent
2e13b1ab17
commit
c9005432ea
2 changed files with 10 additions and 6 deletions
12
.github/workflows/create-or-promote-release.yml
vendored
12
.github/workflows/create-or-promote-release.yml
vendored
|
|
@ -141,16 +141,20 @@ jobs:
|
|||
|
||||
cleanup-on-failure:
|
||||
needs: [determine-tags, call-release-workflow]
|
||||
if: ${{ failure() && !inputs.dry_run && inputs.channel == 'internal' }}
|
||||
if: ${{ (failure() || cancelled()) && !inputs.dry_run && inputs.channel == 'internal' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Delete Failed Tag
|
||||
- name: Delete Failed or Cancelled Tag
|
||||
env:
|
||||
FINAL_TAG: ${{ needs.determine-tags.outputs.final_tag }}
|
||||
run: |
|
||||
echo "Release workflow failed. Deleting tag $FINAL_TAG to allow a clean retry..."
|
||||
git push origin :refs/tags/"$FINAL_TAG" || echo "Tag was not pushed or already deleted."
|
||||
if [ -n "$FINAL_TAG" ]; then
|
||||
echo "Release workflow failed or was cancelled. Deleting tag $FINAL_TAG to allow a clean retry..."
|
||||
git push origin :refs/tags/"$FINAL_TAG" || echo "Tag was not pushed or already deleted."
|
||||
else
|
||||
echo "No tag was created to delete."
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ platform :android do
|
|||
desc "Build the F-Droid release"
|
||||
lane :fdroid_build do
|
||||
gradle(
|
||||
task: "clean assembleFdroidRelease",
|
||||
task: "assembleFdroidRelease",
|
||||
properties: {
|
||||
"android.injected.version.name" => ENV['VERSION_NAME'],
|
||||
"android.injected.version.code" => ENV['VERSION_CODE']
|
||||
|
|
@ -46,7 +46,7 @@ platform :android do
|
|||
desc "Build the Google Release"
|
||||
private_lane :build_google_release do
|
||||
gradle(
|
||||
task: "clean bundleGoogleRelease assembleGoogleRelease",
|
||||
task: "bundleGoogleRelease assembleGoogleRelease",
|
||||
print_command: false,
|
||||
properties: {
|
||||
"android.injected.version.name" => ENV['VERSION_NAME'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue