Skip to content

Commit

Permalink
#217 work on central publish
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoschwald committed Jan 3, 2022
1 parent 137edbc commit fae68c8
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 54 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
env:
GIT_USER_NAME: robertoschwald
GIT_USER_EMAIL: [email protected]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Set the current release version
id: release_version
run: echo ::set-output name=release_version::${GITHUB_REF:11}
- name: Run pre-release
uses: micronaut-projects/github-actions/pre-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate secring file
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
- name: Publish to Sonatype OSSRH
id: publish
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: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
with:
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
- name: Publish Documentation
id: docs
if: steps.publish.outcome == 'success'
uses: gradle/gradle-build-action@v2
with:
arguments: docs
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Publish to Github Pages
if: steps.docs.outcome == 'success'
uses: micronaut-projects/github-pages-deploy-action@master
env:
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: plugin/build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: [email protected]
COMMIT_NAME: Robert Oschwald
VERSION: ${{ steps.release_version.outputs.release_version }}
- name: Run post-release
if: success()
uses: micronaut-projects/github-actions/post-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
SNAPSHOT_SUFFIX: -SNAPSHOT
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M

vcsUrl=https://github.com/robertoschwald/grails-audit-logging-plugin
websiteUrl=https://github.com/robertoschwald/grails-audit-logging-plugin
issueTrackerUrl=https://github.com/robertoschwald/grails-audit-logging-plugin/issues
vcsUrl=https://github.com/symentis/grails-audit-logging-plugin
websiteUrl=https://github.com/symentis/grails-audit-logging-plugin
issueTrackerUrl=https://github.com/symentis/grails-audit-logging-plugin/issues
13 changes: 0 additions & 13 deletions gradle/artifactoryPublish.gradle

This file was deleted.

22 changes: 0 additions & 22 deletions gradle/grailsPublish.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion makedoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST
echo " "
echo "** Updating gh-pages branch **"
pushd plugin/build
git clone https://github.com/robertoschwald/grails-audit-logging-plugin.git -b gh-pages gh-pages --single-branch > /dev/null
git clone https://github.com/symentis/grails-audit-logging-plugin.git -b gh-pages gh-pages --single-branch > /dev/null
cd gh-pages

# prepare index.html
Expand Down
6 changes: 2 additions & 4 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import java.text.SimpleDateFormat

buildscript {
repositories {
mavenLocal()
// mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
}
Expand All @@ -19,7 +19,7 @@ plugins {
}

version project.file("../version.txt").text.trim()
group "org.grails.plugins"
group "com.symentis.grails.plugins"

apply plugin: "eclipse"
apply plugin: "idea"
Expand Down Expand Up @@ -78,8 +78,6 @@ task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}

apply from: "${rootProject.projectDir}/gradle/grailsPublish.gradle"
apply from: "${rootProject.projectDir}/gradle/artifactoryPublish.gradle"
apply from: "${rootProject.projectDir}/gradle/docs.gradle"


Expand Down
12 changes: 6 additions & 6 deletions plugin/src/docs/templates/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</head>

<body>
<a href="http://github.com/robertoschwald/grails-audit-logging-plugin">
<a href="http://github.com/symentis/grails-audit-logging-plugin">
<img style="position: absolute; top: 0; right: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
</a>

Expand Down Expand Up @@ -111,22 +111,22 @@
<hr />

<div class="download">
<a href="http://github.com/robertoschwald/grails-audit-logging-plugin/zipball/master">
<a href="http://github.com/symentis/grails-audit-logging-plugin/zipball/master">
<img width="90" src="http://github.com/images/modules/download/zip.png">
</a>
<a href="http://github.com/robertoschwald/grails-audit-logging-plugin/tarball/master">
<a href="http://github.com/symentis/grails-audit-logging-plugin/tarball/master">
<img width="90" src="http://github.com/images/modules/download/tar.png">
</a>
</div>

<h2>Download Source</h2>
<p>
You can download this project in either
<a href="http://github.com/robertoschwald/grails-audit-logging-plugin/zipball/master">zip</a> or
<a href="http://github.com/robertoschwald/grails-audit-logging-plugin/tarball/master">tar</a> formats.
<a href="http://github.com/symentis/grails-audit-logging-plugin/zipball/master">zip</a> or
<a href="http://github.com/symentis/grails-audit-logging-plugin/tarball/master">tar</a> formats.
</p>
<p>You can also clone the project with <a href="http://git-scm.com">Git</a> by running:
<pre>$ git clone git://github.com/robertoschwald/grails-audit-logging-plugin</pre>
<pre>$ git clone git://github.com/symentis/grails-audit-logging-plugin</pre>
</p>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException
* http://www.hibernate.org/318.html
*
* See Documentation:
* https://github.com/robertoschwald/grails-audit-logging-plugin
* https://github.com/symentis/grails-audit-logging-plugin
*
*/
@Slf4j
Expand All @@ -49,7 +49,7 @@ class AuditLoggingGrailsPlugin extends Plugin {
def description = """
Automatically log change events for domain objects. Optionally supports Stamping. This plugin is ORM agnostic.
"""
String documentation = 'https://github.com/robertoschwald/grails-audit-logging-plugin'
String documentation = 'https://github.com/symentis/grails-audit-logging-plugin'
String license = 'APACHE'

def developers = [
Expand All @@ -58,8 +58,8 @@ class AuditLoggingGrailsPlugin extends Plugin {
[name: 'Aaron Long', email: '[email protected]']
]

def issueManagement = [system: 'GitHub', url: 'https://github.com/robertoschwald/grails-audit-logging-plugin/issues']
def scm = [url: 'https://github.com/robertoschwald/grails-audit-logging-plugin']
def issueManagement = [system: 'GitHub', url: 'https://github.com/symentis/grails-audit-logging-plugin/issues']
def scm = [url: 'https://github.com/symentis/grails-audit-logging-plugin']
def loadAfter = ['core', 'dataSource', 'springSecurityCore']

// Register generic GORM listener
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
5.0.0-SNAPSHOT
5.0.0

0 comments on commit fae68c8

Please sign in to comment.