Release 0.7.0 #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare release | |
on: | |
pull_request: | |
types: [ closed ] | |
paths: | |
- '.github/project.yml' | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
pre-release: | |
name: Prepare release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
ref: main | |
- name: Extract versions from project.yml | |
run: | | |
current=$(grep 'current-version:' .github/project.yml | awk '{print $2}' | tr -d '"') | |
next=$(grep 'next-version:' .github/project.yml | awk '{print $2}' | tr -d '"') | |
echo "CURRENT_VERSION=$current" >> $GITHUB_ENV | |
echo "NEXT_VERSION=$next" >> $GITHUB_ENV | |
- name: Update README.md | |
run: sed -E -i "s|(<version>)[^<]*(</version>)|\1${{env.CURRENT_VERSION}}\2|" README.md | |
- name: Update pom.xml to release version | |
run: | | |
./mvnw versions:set -DnewVersion=${{env.CURRENT_VERSION}} | |
./mvnw versions:set -f samples/pom.xml -DnewVersion=${{env.CURRENT_VERSION}} | |
- name: Commit and push release updates | |
uses: ./.github/actions/commit-push | |
with: | |
commit_message: "Prepare release ${{env.CURRENT_VERSION}}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "${{env.CURRENT_VERSION}}" | |
name: "${{env.CURRENT_VERSION}}" | |
draft: false | |
prerelease: false | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GH_BOT_TOKEN}} |