4.0.0-M1 #42
Workflow file for this run
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: "Release" | |
on: | |
release: | |
types: [published] | |
env: | |
GIT_USER_NAME: 'grails-build' | |
GIT_USER_EMAIL: '[email protected]' | |
jobs: | |
publish: | |
outputs: | |
release_version: ${{ steps.release_version.outputs.value }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
- name: "π Store the current release version" | |
id: release_version | |
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT | |
- name: "β Run pre-release" | |
uses: grails/github-actions/pre-release@main | |
- name: "𧩠Run Assemble" | |
if: success() | |
id: assemble | |
env: | |
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew assemble | |
- name: "π€ Upload Distribution" | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: grails-views-${{ steps.release_version.outputs.value }} | |
path: ./**/build/libs/* | |
- name: "π Generate key file for artifact signing" | |
env: | |
SECRING_FILE: ${{ secrets.SECRING_FILE }} | |
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg | |
- name: "π€ Publish release artifacts to Sonatype" | |
env: | |
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: > | |
./gradlew | |
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg | |
publishToSonatype | |
closeSonatypeStagingRepository | |
release: | |
needs: publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # limit to read access | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
ref: v${{ needs.publish.outputs.release_version }} | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
- name: "πͺ Nexus Staging Close And Release" | |
env: | |
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: > | |
./gradlew | |
findSonatypeStagingRepository | |
releaseSonatypeStagingRepository | |
- name: "βοΈ Run post-release" | |
if: success() | |
uses: grails/github-actions/post-release@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
docs: | |
needs: publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
ref: v${{ needs.publish.outputs.release_version }} | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
- name: "π Generate Documentation" | |
if: success() | |
env: | |
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: > | |
./gradlew | |
views-docs:docs | |
- name: "π€ Publish Documentation to Github Pages" | |
if: success() | |
uses: grails/github-pages-deploy-action@grails | |
env: | |
BETA: ${{ contains(needs.publish.outputs.release_version, 'M') }} | |
BRANCH: gh-pages | |
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} | |
COMMIT_NAME: ${{ env.GIT_USER_NAME }} | |
FOLDER: docs/build/docs | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
VERSION: ${{ needs.publish.outputs.release_version }} |