-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure JReleaser #737
Closed
Closed
Configure JReleaser #737
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,48 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'zulu' | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
|
||
- name: Build | ||
run: ./gradlew build -S | ||
|
||
- name: Upload Reports | ||
uses: actions/upload-artifact@v1 | ||
if: failure() | ||
with: | ||
name: reports-${{ runner.os }} | ||
path: | | ||
jbake-core/build | ||
jbake-dist/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,57 @@ | ||
name: EarlyAccess | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
earlyaccess: | ||
name: EarlyAccess | ||
if: github.repository == 'jbake-org/jbake' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'zulu' | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
|
||
- name: Build | ||
run: ./gradlew build -S | ||
|
||
- name: Release | ||
run: ./gradlew jreleaserRelease -S | ||
env: | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | ||
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | ||
|
||
- name: JReleaser output | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jreleaser-logs | ||
path: | | ||
jbake-dist/build/jreleaser/trace.log | ||
jbake-dist/build/jreleaser/output.properties |
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,58 @@ | ||
apply plugin: 'org.jreleaser' | ||
|
||
// cannot reference project. properties inside jreleaser config block | ||
// as that collides with the "project" DSL element of the config extension | ||
ext.releaseIsDryrun = (project.rootProject.findProperty('dryrun') ?: false).toBoolean() | ||
ext.projectWebsite = project.website | ||
|
||
jreleaser { | ||
dryrun = releaseIsDryrun | ||
gitRootSearch = true | ||
|
||
project { | ||
website = projectWebsite | ||
authors = ['Jonathan Bullock'] | ||
license = 'MIT' | ||
extraProperties.put('inceptionYear', '2012') | ||
} | ||
|
||
release { | ||
github { | ||
overwrite = true | ||
branch = 'master' | ||
changelog { | ||
formatted = 'always' | ||
format = '- {{commitShortHash}} {{commitTitle}}' | ||
contributors { | ||
format = '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}' | ||
} | ||
hide { | ||
contributors = ['GitHub'] | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
active = 'always' | ||
armored = true | ||
} | ||
|
||
checksum { | ||
individual = true | ||
} | ||
|
||
distributions { | ||
jbake { | ||
sdkman { | ||
active = 'release' | ||
} | ||
artifact { | ||
path = 'build/distributions/{{distributionName}}-{{projectVersion}}-bin.zip' | ||
} | ||
artifact { | ||
path = 'build/distributions/{{distributionName}}-{{projectVersion}}.tar' | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supported by setup-java as well: https://github.com/actions/setup-java#caching-packages-dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. Don't count on that feature to be permanent, as you may have noticed in this issue actions/setup-java#40 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am reporter of actions/setup-java#40 and this is only about configuring Maven but not about caching at all (particularly not about caching Gradle artifacts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm well aware of that which is why I typed "as you may have noticed". IMHO
setup-java
should be concerned with just that: setting up a suitable JDK/JRE/JR. Adding caching for Maven or any other Java build tool is beyond its scope.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may happen, but never in a 2.x release of setup-java (is it would be backwards-incompatible). As long as you use setup-java@v2 I would recommend getting rid of additional caching action steps and leverage what is shipped with setup-java@v2 as having additional steps