Retry Release #12
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: ['11'] | |
env: | |
GIT_USER_NAME: puneetbehl | |
GIT_USER_EMAIL: [email protected] | |
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
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 | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
- 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: 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 }} |