Skip to content
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
24 changes: 15 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
else
mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
fi
mvn -B release:update-versions
mvn -B process-resources
mvn -B validate

Expand All @@ -57,13 +56,15 @@ jobs:
echo "version=$V" >> $GITHUB_OUTPUT

- name: Create release branch
id: release_branch
run: |
BRANCH="release/v${{ steps.version.outputs.version }}"
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git checkout -b "$BRANCH"
git add -A
git commit -m "build(release): release version ${{ steps.version.outputs.version }}"
echo "release_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
# Force-push so we overwrite any existing release branch (e.g. from a previous run)
git push --force origin "$BRANCH"
echo "$BRANCH" > releasebranch.txt
Expand All @@ -78,25 +79,30 @@ jobs:
with:
name: "Release ${{ steps.version.outputs.version }}"
tag_name: "v${{ steps.version.outputs.version }}"
target_commitish: "release/v${{ steps.version.outputs.version }}"
target_commitish: ${{ steps.release_branch.outputs.release_sha }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request for release + next version
- name: Bump to next development version
run: |
BODY=$(cat <<- EOF
mvn -B release:update-versions -DgenerateBackupPoms=false
git add -A
git commit -m "build(release): bump to next development version"
git push origin "release/v${{ steps.version.outputs.version }}"

- name: Create Pull Request for release + next version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_BODY: |
This PR contains the following changes:

1. Release version bump to ${{ steps.version.outputs.version }}.
2. Filtered resources (docs, JS) updated to reflect the release version.
3. Next development version bump after the release.
EOF
)
run: |
gh pr create \
--title "build(release): release ${{ steps.version.outputs.version }} and bump to next development version" \
--body "$BODY" \
--body "$PR_BODY" \
--base main \
--head "release/v${{ steps.version.outputs.version }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}