Skip to content

Commit

Permalink
Add a reusable workflow to update the sub-project to the next release
Browse files Browse the repository at this point in the history
Currently updating to the next release is a manual step, this adds a new
reuasable workflow that can be used to automate the required steps that
include:

- update the project version and child modules
- update the parent version
- run a build and look for required version bumps
  • Loading branch information
laeubi committed Feb 20, 2023
1 parent efaa1ae commit f192e41
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/updateRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update For Next Release

on:
workflow_call:
jobs:
update:
runs-on: ubuntu-latest
if: contains(github.event.milestone.description, 'Release')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Update Versions
run: >-
mvn -U -Pbuild-individual-bundles -ntp
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-version -DnewVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-parent-version -DnewParentVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
- name: Build and Bump Versions
uses: Wandalen/wretry.action@master
with:
attempt_delay: 120000
attempt_limit: 10
command: >-
mvn -U -Pbuild-individual-bundles -ntp
clean verify
-DskipTests
-Dcompare-version-with-baselines.skip=false
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:bump-versions -Dtycho.bump-versions.increment=100
- name: Create Pull Request for Release ${{ github.event.milestone.title }}
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update for release ${{ github.event.milestone.title }}
branch: update_R${{ github.event.milestone.title }}
title: Update for release ${{ github.event.milestone.title }}
body: A new release milstone was created, please review the changes and merge if appropriate.
delete-branch: true
milestone: ${{ github.event.milestone.number }}
add-paths: |
pom.xml
*.MF

0 comments on commit f192e41

Please sign in to comment.