-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b90ccf0
commit aa2ccda
Showing
10 changed files
with
283 additions
and
150 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,21 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: ./gradlew publishIfNeeded | ||
env: | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
OSSRH_USER: ${{ secrets.OSSRH_USER }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }} | ||
COM_GRADLEUP_PROFILE_ID: ${{ secrets.COM_GRADLEUP_PROFILE_ID }} |
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
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
import org.gradle.api.Project | ||
|
||
val sonatypeOptions = System.getenv("OSSRH_USER")?.let { | ||
SonatypeOptions( | ||
username = it, | ||
password = System.getenv("OSSRH_PASSWORD") ?: error("OSSRH_PASSWORD not found"), | ||
host = SonatypeHost.Ossrh, | ||
stagingProfile = System.getenv("COM_GRADLEUP_PROFILE_ID") ?: error("COM_GRADLEUP_PROFILE_ID not found"), | ||
) | ||
} | ||
|
||
fun Project.configureLib() { | ||
targetJdk(11) | ||
|
||
configurePublishing( | ||
projectOptions = ProjectOptions( | ||
groupId = "com.gradleup.gratatouille", | ||
version = "0.0.1", | ||
descriptions = "Cook yourself delicious Gradle plugins", | ||
vcsUrl = "https://github.com/GradleUp/gratatouille", | ||
developers = "GradleUp authors", | ||
license = "MIT License", | ||
licenseUrl = "https://github.com/GradleUp/gratatouille/blob/main/LICENSE" | ||
), | ||
sonatypeOptions = sonatypeOptions, | ||
signingOptions = System.getenv("GPG_KEY")?.let { | ||
SigningOptions( | ||
privateKey = it, | ||
privateKeyPassword = System.getenv("GPG_KEY_PASSWORD") ?: error("GPG_KEY_PASSWORD not found") | ||
) | ||
}, | ||
) | ||
} | ||
|
||
fun Project.configureRoot() { | ||
configureGitHub( | ||
sonatypeOptions = sonatypeOptions, | ||
githubOptions = GithubOptions( | ||
mainBranch = "main", | ||
autoRelease = false | ||
) | ||
) | ||
} |
Oops, something went wrong.