Skip to content

Commit

Permalink
Merge pull request #324 from sbglasius/upgrade/grails4
Browse files Browse the repository at this point in the history
Upgrade/grails4
  • Loading branch information
sbglasius authored Jul 1, 2023
2 parents 3ca6f4d + f4f9aee commit 8ce11bd
Show file tree
Hide file tree
Showing 32 changed files with 439 additions and 323 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/gradle.yml
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
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
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 }}
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8ce11bd

Please sign in to comment.