Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release into master branch #332

Merged
merged 14 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
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
17 changes: 0 additions & 17 deletions .github/release-notes.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changelog:
categories:
- title: Headliners
labels:
- headliner
- title: New Features
labels:
- feature
- title: Enhancements
labels:
- enhancement
- title: Bugs Fixed
labels:
- bug
- title: Documentation
labels:
- documentation
- title: Automation
labels:
- automation
- title: Other changes
labels:
- "*"
8 changes: 4 additions & 4 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
env:
MAVEN_OPTS: -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -43,4 +43,4 @@ jobs:
run: mvn -B -q spotless:check

- name: Upload Coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
33 changes: 8 additions & 25 deletions .github/workflows/create-hotfix-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand All @@ -29,44 +29,27 @@ jobs:

- name: Get latest tag
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-get-latest-tag@v1
run: echo "LATEST_TAG= $(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
id: get-latest-tag

- name: Format latest tag
if: ${{ !github.event.inputs.version }}
run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^koryphe-//')" >> $GITHUB_ENV
run: echo "CURRENT_VERSION=$(echo ${{ env.LATEST_TAG }} | sed 's/^koryphe-//')" >> $GITHUB_ENV

- name: Bump latest tag variable
- name: Bump latest tag variable version
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ env.CURRENT_VERSION }}
level: patch

- name: Set version automatically
if: ${{ !github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.\2.$((\3+1))/' | sh)" >> $GITHUB_ENV

- name: Verify version regex
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ env.RELEASE_VERSION }}
# Ensure version doesn't end in .0
regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.([1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Fail if incorrect version
if: ${{ !steps.regex-match.outputs.match }}
run: exit 1
run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Set hotfix branch
run: echo "BRANCH_NAME=$(echo hotfix/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV

- name: Set up Github credentials
run: |
git config user.name Gaffer
git config user.email github-actions@github.com
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Update versions
run: |
Expand Down
63 changes: 19 additions & 44 deletions .github/workflows/create-release-branch.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Create Release Branch

on:
workflow_dispatch:
inputs:
version:
description: 'Release Branch Version'
required: false
milestone:
types:
- closed

env:
artifactId: koryphe
Expand All @@ -17,56 +15,22 @@ jobs:

steps:
- name: Checkout develop
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: develop
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
fetch-depth: 0

- name: Set version from input
if: ${{ github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ github.event.inputs.version }} | sed 's/^v//')" >> $GITHUB_ENV

- name: Get latest tag
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: Format latest tag
if: ${{ !github.event.inputs.version }}
run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^koryphe-//')" >> $GITHUB_ENV

- name: Bump latest tag variable
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ env.CURRENT_VERSION }}
level: minor

- name: Set version automatically
if: ${{ !github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV

- name: Verify version regex
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ env.RELEASE_VERSION }}
# Ensure valid semver version
regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Fail if incorrect version
if: ${{ !steps.regex-match.outputs.match }}
run: exit 1
- name: Set version from milestone
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }})" >> $GITHUB_ENV

- name: Set release branch
run: echo "BRANCH_NAME=$(echo release/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV

- name: Set up Github credentials
run: |
git config user.name Gaffer
git config user.email github-actions@github.com
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Update versions
run: |
Expand All @@ -77,3 +41,14 @@ jobs:
git checkout -b $BRANCH_NAME
git commit -a -m "prepare release $artifactId-$RELEASE_VERSION"
git push --set-upstream origin $BRANCH_NAME
- name: Tag release branch
run: |
git tag koryphe-$RELEASE_VERSION
git push origin --tags
- name: Create PR to master
run: |
gh pr create -B master -H $BRANCH_NAME --title 'Merge release into master branch' --body 'Created by GH Action'
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/link-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
issue-links:
runs-on: ubuntu-latest
steps:
- uses: tkt-actions/add-issue-links@v1.6.0
- uses: tkt-actions/add-issue-links@v1.8.2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
branch-prefix: 'gh-'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'

- name: Checkout master
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master

Expand Down
Loading
Loading