Skip to content

Commit

Permalink
ci: Rework dry runs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GeorgesStavracas committed Oct 9, 2024
1 parent 83c5a00 commit 4183a17
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) }}
Expand Down

0 comments on commit 4183a17

Please sign in to comment.