From 4183a17d3a04dfc1db09de6df28552d00a5fd31c Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 9 Oct 2024 18:25:38 -0300 Subject: [PATCH] ci: Rework dry runs Make dry runs do everything a regular run would do, except it doesn't *actually* push nor publish anything. It still extracts release info, updates PO files, etc. --- .github/workflows/release.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd7afed33..98eb2aa39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,19 +39,23 @@ jobs: uses: actions/checkout@v4 - name: Build xdg-desktop-portal - if: ${{ !fromJSON(github.event.inputs.dryRun) }} run: | meson setup . _build meson dist -C _build - name: Update translation files - if: ${{ !fromJSON(github.event.inputs.dryRun) }} + env: + DRY_RUN: ${{ github.event.inputs.dryRun }} run: | meson setup . _build meson compile -C _build/ xdg-desktop-portal-update-po git add po/*po git commit -m "Update po files" - git push + + if [ "$DRY_RUN" = "false" ]; then + git push + fi + git clean -fxd - name: Extract release information @@ -89,11 +93,15 @@ jobs: echo $preRelease - name: Tag release - if: ${{ !fromJSON(github.event.inputs.dryRun) }} + env: + DRY_RUN: ${{ github.event.inputs.dryRun }} run: | git commit --allow-empty -m $releaseVersion git tag $releaseVersion - git push --tags + + if [ "$DRY_RUN" = "false" ]; then + git push --tags + fi - name: Create release if: ${{ !fromJSON(github.event.inputs.dryRun) }}