Skip to content

Commit

Permalink
Add a workflow to prepare the next release cycle
Browse files Browse the repository at this point in the history
This workflow is triggered by the milestone creation and automatically
performs the updates of the master pom and target to be prepared for
usage in the submodules and creates a PR. This PR will then trigger the
deploy of the changed xmls, so it can be used immediatly to adjust the
sub-projects.
  • Loading branch information
laeubi committed Feb 20, 2023
1 parent 3f38119 commit 9331ab8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/prepareRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Prepare Next Release
on:
milestone:
types: [created]

jobs:
prepare:
runs-on: ubuntu-latest
if: contains(github.event.milestone.description, 'Release')
permissions:
pull-requests: write
contents: write
steps:
- id: get-release-name
run: |
name=$(echo ${{ github.event.milestone.due_on }} | cut -d- -f-2)
echo "name=$name" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Update Main Versions
run: mvn -U -ntp -f eclipse-platform-parent org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-version -DnewVersion=${{ github.event.milestone.title }}.0-SNAPSHOT -Dmodules=../eclipse.platform.releng.prereqs.sdk
- name: Update Release Versions
run: mvn -ntp -f eclipse-platform-parent/pom.xml --non-recursive org.eclipse.tycho:tycho-versions-plugin:4.0.0-SNAPSHOT:set-property -Dproperties=releaseNumberSDK,releaseNumberPlatform,releaseName -DnewReleaseName=${{ steps.get-release-name.outputs.name }} -DnewReleaseNumberSDK=${{ github.event.milestone.title }} -DnewReleaseNumberPlatform=${{ github.event.milestone.title }}
- name: Create Pull Request for Release ${{ github.event.milestone.title }}
uses: peter-evans/create-pull-request@v4
with:
commit-message: Prepare Release ${{ github.event.milestone.title }}
branch: prepare_R${{ github.event.milestone.title }}
title: Prepare 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: |
eclipse-platform-parent/pom.xml
eclipse.platform.releng.prereqs.sdk/pom.xml

0 comments on commit 9331ab8

Please sign in to comment.