-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from sbglasius/upgrade/grails4
Upgrade/grails4
- Loading branch information
Showing
32 changed files
with
439 additions
and
323 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Java CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- upgrade/grails4 | ||
pull_request: | ||
branches: | ||
- master | ||
- upgrade/grails4 | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
checks: write # to publish result as PR check (scacap/action-surefire-report) | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: ['8'] | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: ${{ matrix.java }} | ||
- name: Run Tests | ||
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | ||
id: tests | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: check | ||
- name: Run Build | ||
if: github.event_name == 'push' | ||
id: build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [ published ] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: Get latest release version number | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
- name: Run pre-release | ||
uses: micronaut-projects/github-actions/pre-release@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish to Sonatype OSSRH | ||
id: publish | ||
if: steps.assemble.outcome == 'success' | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
SECRING_FILE: ${{ secrets.SECRING_FILE }} | ||
with: | ||
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
- name: Bump patch version by one | ||
uses: actions-ecosystem/action-bump-semver@v1 | ||
id: bump_semver | ||
with: | ||
current_version: ${{steps.get_version.outputs.version-without-v }} | ||
level: patch | ||
- name: Set version in gradle.properties | ||
id: snapshotVersion | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
NEXT_VERSION: ${{ steps.bump_semver.outputs.new_version }} | ||
with: | ||
arguments: -Pversion="${NEXT_VERSION}" | ||
- name: Commit & Push changes | ||
uses: actions-js/push@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
author_name: ${{ secrets.GIT_USER_NAME }} | ||
author_email: $${ secrets.GIT_USER_EMAIL }} | ||
message: 'Set version to next SNAPSHOT' | ||
- name: Build documentation | ||
id: asciidoctor | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }} | ||
with: | ||
arguments: -Pversion="${RELEASE_VERSION}" | ||
- name: Export Gradle Properties | ||
uses: micronaut-projects/github-actions/export-gradle-properties@master | ||
- name: Publish to Github Pages | ||
if: success() | ||
uses: micronaut-projects/github-pages-deploy-action@master | ||
env: | ||
BETA: ${{ steps.get_version.outputs.isPrerelase }} | ||
TARGET_REPOSITORY: ${{ github.repository }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: build/asciidoc | ||
DOC_FOLDER: latest | ||
COMMIT_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
COMMIT_NAME: ${{ secrets.GIT_USER_NAME }} | ||
VERSION: ${{ steps.get_version.outputs.version-without-v }} | ||
- name: Run post-release | ||
if: success() | ||
uses: micronaut-projects/github-actions/post-release@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.