Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release workflow improvements #1465

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@ jobs:
uses: actions/checkout@v4

- name: Update translation files
if: ${{ !fromJSON(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
git clean -fxd

- name: Build xdg-desktop-portal
if: ${{ !fromJSON(github.event.inputs.dryRun) }}
run: |
meson setup . _build
meson dist -C _build
Expand All @@ -64,13 +61,15 @@ jobs:
releaseVersion=`perl -0777nE 'print $& if /(?<=Changes in ).*/' NEWS`
fi
echo "releaseVersion=$releaseVersion" | tee -a $GITHUB_ENV
echo $releaseVersion

# Extract the changelog
{
echo "releaseChangelog<<EOF"
perl -0777nE 'print $& if /(?<=\n\n).*?(?=\n\n)/sg' NEWS
echo "\nEOF"
} | tee -a $GITHUB_ENV
echo $releaseChangelog

# Check if version is a pre-release
if [ -z $preRelease ]; then
Expand All @@ -84,12 +83,19 @@ jobs:
echo "false";
fi
} | tee -a $GITHUB_ENV
echo $preRelease

- name: Tag release
env:
DRY_RUN: ${{ github.event.inputs.dryRun }}
run: |
git commit --allow-empty -m $releaseVersion
git tag -a $releaseVersion -m $releaseVersion

- name: Push translations, release commit, and tag
if: ${{ !fromJSON(github.event.inputs.dryRun) }}
run: |
git tag $releaseVersion
git push --tags
git push --atomic --follow-tags

- name: Create release
if: ${{ !fromJSON(github.event.inputs.dryRun) }}
Expand Down
Loading