Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 59c1400

Browse files
committed
Perform release against version from branch
1 parent 121b8b2 commit 59c1400

File tree

5 files changed

+56
-9
lines changed

5 files changed

+56
-9
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ name: Release
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
releaseVersion:
7-
description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.'
8-
required: true
9-
type: string
5+
6+
run-name: Release current version for branch ${{ github.ref_name }}
107

118
jobs:
129
release:
13-
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-release.yml@main
10+
uses: spring-projects/spring-integration-aws/.github/workflows/spring-release-for-branch.yml@main
1411
with:
15-
releaseVersion: ${{ inputs.releaseVersion }}
1612
buildToolArgs: dist
1713
repositoryTeam: artembilan,garyrussell
1814
secrets: inherit

.github/workflows/spring-artifactory-gradle-release-staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
7171
echo buildName=$buildName >> $GITHUB_OUTPUT
7272
echo buildNumber=$JFROG_CLI_BUILD_NUMBER >> $GITHUB_OUTPUT
73+
echo "::notice ::Artifactory Build Name=$JFROG_CLI_BUILD_NAME"
74+
echo "::notice ::Artifactory Build Number=$JFROG_CLI_BUILD_NUMBER"
7375
7476
- name: Set Release Version
7577
run: sed -i "s/version=.*/version=${{ inputs.releaseVersion }}/" gradle.properties

.github/workflows/spring-artifactory-maven-release-staging.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- uses: actions/checkout@v3
3232
with:
3333
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
34+
show-progress: false
3435

3536
- name: Set up JDK
3637
uses: actions/setup-java@v3
@@ -60,6 +61,8 @@ jobs:
6061
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
6162
echo buildName=$buildName >> $GITHUB_OUTPUT
6263
echo buildNumber=$JFROG_CLI_BUILD_NUMBER >> $GITHUB_OUTPUT
64+
echo "::notice ::Artifactory Build Name=$JFROG_CLI_BUILD_NAME"
65+
echo "::notice ::Artifactory Build Number=$JFROG_CLI_BUILD_NUMBER"
6366
6467
- name: Set Release Version
6568
run: |

.github/workflows/spring-artifactory-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ on:
1616
required: false
1717
type: string
1818

19-
run-name: Release version ${{ inputs.releaseVersion }}
20-
2119
jobs:
2220
staging:
2321
uses: spring-projects/spring-integration-aws/.github/workflows/spring-stage-release.yml@main
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Perform Release with Artifactory
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
buildToolArgs:
7+
description: 'Additional Maven or Gradle command arguments: tasks, goals, plugins etc. The `install` for Maven is included. The `build` and `artifactoryPublish` for Gradle are included.'
8+
required: false
9+
type: string
10+
repositoryTeam:
11+
description: 'Comma-separate GitHub user names for repository team members to exclude from contributors'
12+
required: false
13+
type: string
14+
15+
jobs:
16+
releaseVersion:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
releaseVersion: ${{ steps.release-version.outputs.releaseVersion }}
20+
21+
steps:
22+
23+
- uses: actions/checkout@v4
24+
with:
25+
show-progress: false
26+
27+
- name: Find Current Version to Release
28+
id: release-version
29+
run: |
30+
if test -f pom.xml
31+
then
32+
CURRENT_VERSION=$(./mvnw help:evaluate -Dexpression="project.version" -q -DforceStdout)
33+
else
34+
CURRENT_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
35+
fi
36+
export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT}
37+
RELEASE_VERSION=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.title | startswith(env.CANDIDATE_VERSION))) | .[0] | .title')
38+
echo releaseVersion=$RELEASE_VERSION >> $GITHUB_OUTPUT
39+
echo "::notice ::RELEASE VERSION=$RELEASE_VERSION"
40+
41+
perform-release:
42+
needs: releaseVersion
43+
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-release.yml@main
44+
with:
45+
releaseVersion: ${{ needs.releaseVersion.outputs.releaseVersion }}
46+
buildToolArgs: ${{ inputs.buildToolArgs }}
47+
repositoryTeam: ${{ inputs.repositoryTeam }}
48+
secrets: inherit

0 commit comments

Comments
 (0)