Skip to content

Commit f192e41

Browse files
committed
Add a reusable workflow to update the sub-project to the next release
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
1 parent efaa1ae commit f192e41

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/updateRelease.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Update For Next Release
2+
3+
on:
4+
workflow_call:
5+
jobs:
6+
update:
7+
runs-on: ubuntu-latest
8+
if: contains(github.event.milestone.description, 'Release')
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
ref: master
14+
- name: Set up JDK
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '17'
18+
distribution: 'temurin'
19+
cache: maven
20+
- name: Update Versions
21+
run: >-
22+
mvn -U -Pbuild-individual-bundles -ntp
23+
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-version -DnewVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
24+
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-parent-version -DnewParentVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
25+
- name: Build and Bump Versions
26+
uses: Wandalen/wretry.action@master
27+
with:
28+
attempt_delay: 120000
29+
attempt_limit: 10
30+
command: >-
31+
mvn -U -Pbuild-individual-bundles -ntp
32+
clean verify
33+
-DskipTests
34+
-Dcompare-version-with-baselines.skip=false
35+
org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:bump-versions -Dtycho.bump-versions.increment=100
36+
- name: Create Pull Request for Release ${{ github.event.milestone.title }}
37+
uses: peter-evans/create-pull-request@v4
38+
with:
39+
commit-message: Update for release ${{ github.event.milestone.title }}
40+
branch: update_R${{ github.event.milestone.title }}
41+
title: Update for release ${{ github.event.milestone.title }}
42+
body: A new release milstone was created, please review the changes and merge if appropriate.
43+
delete-branch: true
44+
milestone: ${{ github.event.milestone.number }}
45+
add-paths: |
46+
pom.xml
47+
*.MF
48+

0 commit comments

Comments
 (0)