Skip to content

Commit

Permalink
Add general release.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Nov 14, 2023
1 parent cf3dc63 commit 266407e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 54 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/promote-ga-to-central.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/promote-milestone.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Build and Stage Release
name: Perform Release

on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.'
required: true

run-name: Release version ${{ inputs.releaseVersion }}
type: string

jobs:
staging:
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main
release:
uses: spring-projects/spring-integration-aws/.github/workflows/spring-release.yml@main
with:
releaseVersion: ${{ inputs.releaseVersion }}
repositoryTeam: artembilan,garyrussell
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Create GH release and Notify Slack

on:
workflow_dispatch:
inputs:
milestone:
description: 'Milestone title, e.g 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.'
required: true
type: string
repositoryTeam:
description: 'Comma-separate GitHub user names for repository team members to exclude from contributors'
required: false
type: string
workflow_call:
inputs:
milestone:
Expand Down Expand Up @@ -39,7 +29,7 @@ jobs:
run: |
wget -q https://github.com/spring-io/github-changelog-generator/releases/download/v0.0.8/github-changelog-generator.jar
java -jar github-changelog-generator.jar $MILESTONE changelog.md --debug \
java -jar github-changelog-generator.jar $MILESTONE changelog.md \
--changelog.repository=$GITHUB_REPOSITORY \
--github.username=spring-builds \
--github.password=${{ secrets.GH_ACTIONS_REPO_TOKEN }} \
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/spring-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Perform Release

on:
workflow_call:
inputs:
releaseVersion:
description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.'
required: true
type: string
repositoryTeam:
description: 'Comma-separate GitHub user names for repository team members to exclude from contributors'
required: false
type: string

run-name: Release version ${{ inputs.releaseVersion }}

env:
IS_GA: ${{ (contains(inputs.releaseVersion, '-M') || contains(inputs.releaseVersion, '-RC')) && false || true }}

jobs:
staging:
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main
with:
releaseVersion: ${{ inputs.releaseVersion }}
secrets: inherit

verify-staged:
needs: staging
uses: ./.github/workflows/verify-staged-artifacts.yml
with:
releaseVersion: ${{ inputs.releaseVersion }}
secrets: inherit

promote_milestone:
if: ${{ !env.IS_GA }}
needs: verify-staged
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-milestone.yml@main
with:
buildName: $JFROG_CLI_BUILD_NAME
buildNumber: $JFROG_CLI_BUILD_NUMBER
secrets: inherit

promote_ga:
if: ${{ env.IS_GA }}
needs: verify-staged
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-central.yml@main
with:
buildName: $JFROG_CLI_BUILD_NAME
buildNumber: $JFROG_CLI_BUILD_NUMBER
secrets: inherit

finalize:
needs: [promote_milestone, promote_ga]
uses: spring-projects/spring-integration-aws/.github/workflows/spring-finalize-release.yml@main
with:
milestone: ${{ inputs.releaseVersion }}
repositoryTeam: ${{ inputs.repositoryTeam }}
secrets: inherit
25 changes: 25 additions & 0 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Verify Staged Artifacts

on:
workflow_call:
inputs:
releaseVersion:
description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.'
required: true
type: string

jobs:
verify-staged:
needs: staging
runs-on: ubuntu-latest
steps:

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: 'maven'

- name: Download staged artifact
run: mvn dependency:get -DrepoUrl=https://repo.spring.io/libs-staging-local -Dartifact=org.springframework.integration:spring-integration-aws:${{ inputs.releaseVersion }}

0 comments on commit 266407e

Please sign in to comment.