Skip to content

Commit

Permalink
Allows pre-release maven central retrieval of github artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Dec 13, 2024
1 parent 151a321 commit 6c0dc39
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- name: "🔨 Run Build"
id: build
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
Expand Down Expand Up @@ -53,6 +55,8 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: "📤 Publish Snapshot to repo.grails.org"
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEVELOCITY_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
with:
arguments: assemble
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
Expand All @@ -51,6 +53,8 @@ jobs:
id: publish
uses: gradle/gradle-build-action@v3
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
Expand Down
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ext.set('signing.password', project.findProperty('signing.password') ?: System.g

apply plugin: 'idea'

allprojects {
allprojects { prj ->
repositories {
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
Expand All @@ -40,6 +40,16 @@ allprojects {
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
if (System.getenv("GITHUB_ACTOR") && System.getenv("GH_TOKEN")
&& prj.name == 'grails-plugin-gsp' && !sitemeshVersion.endsWith('-SNAPSHOT')) {
maven {
url = 'https://maven.pkg.github.com/codeconsolegrails-plugin-sitemesh3'
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GH_TOKEN")
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ groovyVersion=4.0.24
jspApiVersion=4.0.0
jstlVersion=3.0.1
servletApiVersion=6.0.0
sitemeshVersion=7.0.0-SNAPSHOT
sitemeshVersion=7.0.0-M1
controllersRef=https://docs.grails.org/latest/ref/Controllers
commandLineRef=https://docs.grails.org/latest/ref/Command%20Line
grailsDocsVersion=7.0.0-SNAPSHOT
Expand Down

0 comments on commit 6c0dc39

Please sign in to comment.