Retry Release #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Retry Release | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: The Grails Release (e.g. 5.0.3) | |
required: true | |
target_branch: | |
description: The Target Branch (e.g. 5.0.x) | |
required: true | |
permissions: {} | |
jobs: | |
release: | |
permissions: | |
contents: write # to create release | |
issues: read # to get closed issues | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: ['8'] | |
env: | |
GIT_USER_NAME: puneetbehl | |
GIT_USER_EMAIL: [email protected] | |
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: "v${{ github.event.inputs.release }}" | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java }} | |
- name: Extract Target Branch | |
id: extract_branch | |
run: | | |
echo $TARGET_BRANCH | |
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT | |
env: | |
TARGET_BRANCH: ${{ github.event.inputs.target_branch }} | |
- name: Set the current release version | |
id: release_version | |
run: echo "release_version=${VERSION}" >> $GITHUB_OUTPUT | |
env: | |
VERSION: ${{ github.event.inputs.release }} | |
- name: Run Assemble | |
id: assemble | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: assemble | |
- name: Export Gradle Properties | |
uses: micronaut-projects/github-actions/export-gradle-properties@master | |
- name: Upload artifacts to the Github release | |
id: upload_artifact | |
if: steps.assemble.outcome == 'success' | |
uses: Roang-zero1/github-upload-release-artifacts-action@master | |
with: | |
created_tag: v${{ github.event.inputs.release }} | |
args: build/distributions/grails-${{ steps.release_version.outputs.release_version }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Message for the Grails Documentation Release | |
if: steps.assemble.outcome == 'success' | |
id: grails_docs_release_message | |
run: | | |
echo "value={\"grails_version\":\"$RELEASE_VERSION\"}" >> $GITHUB_OUTPUT | |
env: | |
RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }} | |
- name: Invoke grails-doc release workflow | |
if: steps.assemble.outcome == 'success' | |
id: grails_doc | |
uses: benc-uk/[email protected] | |
with: | |
workflow: Release | |
repo: grails/grails-doc | |
ref: ${{ steps.extract_branch.outputs.value }} | |
token: ${{ secrets.GH_TOKEN }} | |
inputs: ${{ steps.grails_docs_release_message.outputs.value }} | |
- name: Invoke grails-static-website release workflow | |
if: steps.assemble.outcome == 'success' | |
id: grails_static_website | |
uses: benc-uk/[email protected] | |
with: | |
workflow: Release | |
repo: grails/grails-static-website | |
ref: master | |
token: ${{ secrets.GH_TOKEN }} | |
inputs: ${{ steps.grails_docs_release_message.outputs.value }} | |
- name: Grails SDK Minor Release | |
if: steps.upload_artifact.outcome == 'success' && contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: sdkMinorRelease | |
env: | |
GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }} | |
GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }} | |
- name: Grails SDK Major Release | |
if: steps.upload_artifact.outcome == 'success' && !contains(steps.release_version.outputs.release_version, 'M') && !contains(steps.release_version.outputs.release_version, 'RC') | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: sdkMajorRelease | |
env: | |
GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }} | |
GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }} | |
- name: Run post-release | |
if: steps.assemble.outcome == 'success' | |
uses: ./.github/actions/post-release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
SNAPSHOT_SUFFIX: -SNAPSHOT | |
TARGET_BRANCH: ${{ github.event.inputs.target_branch }} | |
RELEASE_VERSION: ${{ github.event.inputs.release }} |