a90f9feb09
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
62 lines
2.2 KiB
YAML
62 lines
2.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
releaseVersion:
|
|
description: "Default version to use when preparing a release."
|
|
required: true
|
|
default: "X.Y.Z"
|
|
developmentVersion:
|
|
description: "Default version to use for new local working copy."
|
|
required: true
|
|
default: "X.Y.Z-SNAPSHOT"
|
|
|
|
jobs:
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Configure Git User
|
|
run: |
|
|
git config user.email "actions@github.com"
|
|
git config user.name "GitHub Actions"
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 11
|
|
cache: 'maven'
|
|
- name: Release to GitHub packages
|
|
run: |
|
|
mvn -B clean release:prepare release:perform -s maven-github-settings.xml --file pom.xml -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
|
|
git push origin v${{ github.event.inputs.releaseVersion }}
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
- name: Release to GitHub releases
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: "target/keycloak-restrict-client-auth.jar"
|
|
body_path: "RELEASELOG.md"
|
|
fail_on_unmatched_files: true
|
|
tag_name: v${{ github.event.inputs.releaseVersion }}
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
- name: Create Pull Request
|
|
id: create-pr
|
|
uses: peter-evans/create-pull-request@v5
|
|
with:
|
|
commit-message: "chore(release): Prepare next version"
|
|
delete-branch: "true"
|
|
branch: "release/${{ github.event.inputs.releaseVersion }}"
|
|
base: "main"
|
|
title: "chore(release): Prepare next version after release ${{ github.event.inputs.releaseVersion }}"
|
|
body: "Automated PR to prepare next version after release ${{ github.event.inputs.releaseVersion }}"
|
|
labels: "release,ignore-for-release"
|
|
assignees: "sventorben"
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|