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
71 changes: 71 additions & 0 deletions .github/workflows/release_new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Master release

on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release and tag version (ie 5.5.0)'
required: true
developmentVersion:
description: 'Next development version, with SNAPSHOT'
required: true

jobs:
master_release:
if: "!contains(github.event.head_commit.message, '[maven-release-plugin]')"
runs-on: ubuntu-latest

permissions:
contents: write
packages: write
attestations: write
id-token: write
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches
fetch-depth: 0
# Use PAT instead of the default GITHUB_TOKEN for authentication
token: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]

- name: Configure Git HTTPS authentication
run: |
git config --global url."https://${{ secrets.GH_PACKAGE_REPO_PASSWORD }}@github.com/".insteadOf "[email protected]:"
git remote set-url origin https://${{ secrets.GH_PACKAGE_REPO_PASSWORD }}@github.com/${{ github.repository }}.git

- name: Release with Maven
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PACKAGE_REPO_PASSWORD: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
run: |
mvn -B -Dtag=${{ github.event.inputs.releaseVersion }} release:prepare \
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} --file pom.xml \
&& mvn release:perform -B --file pom.xml

- name: Create A Pull Request
uses: thomaseizinger/[email protected]
with:
github_token: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
head: master
base: develop
title: Released master into develop
body: |
Hi!
This PR was created in response workflow running.
I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}.