-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Showing
4 changed files
with
34 additions
and
74 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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright 2006-2022 the original author or authors. | ||
# Copyright 2006-2024 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -23,7 +23,7 @@ on: | |
branches: [ master ] | ||
|
||
env: | ||
JAVA_VERSION: '8' | ||
JAVA_VERSION: '11' | ||
JAVA_DISTRO: 'zulu' | ||
|
||
jobs: | ||
|
@@ -33,33 +33,21 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: n1hility/cancel-previous-runs@v2 | ||
- name: Cancel previous run | ||
uses: styfle/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DISTRO }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
cache: gradle | ||
|
||
- name: Build | ||
run: ./gradlew -Prelease=true build -S | ||
|
@@ -75,10 +63,13 @@ jobs: | |
env: | ||
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }} | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_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 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact | ||
path: | | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright 2006-2022 the original author or authors. | ||
# Copyright 2006-2024 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -26,7 +26,7 @@ on: | |
required: true | ||
|
||
env: | ||
JAVA_VERSION: '8' | ||
JAVA_VERSION: '11' | ||
JAVA_DISTRO: 'zulu' | ||
|
||
jobs: | ||
|
@@ -37,11 +37,12 @@ jobs: | |
VERSION: ${{ steps.vars.outputs.VERSION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- uses: n1hility/cancel-previous-runs@v2 | ||
- name: Cancel previous run | ||
uses: styfle/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Version | ||
id: vars | ||
|
@@ -54,29 +55,16 @@ jobs: | |
needs: [precheck] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DISTRO }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
cache: gradle | ||
|
||
- name: Set release version | ||
run: | | ||
|
@@ -89,20 +77,9 @@ jobs: | |
git commit -a -m "Releasing version $VERSION" | ||
git push origin master | ||
- name: Build | ||
run: | | ||
./gradlew -Prelease=true build -S | ||
- name: Deploy | ||
env: | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
run: | | ||
./gradlew -Prelease=true -Pfull-release=true \ | ||
-PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} \ | ||
-PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} \ | ||
build publishToSonatype closeAndReleaseSonatypeStagingRepository -S | ||
./gradlew -Pprofile=sbom -PreproducibleBuild=true publish -S | ||
- name: Release | ||
uses: jreleaser/release-action@v2 | ||
|
@@ -111,14 +88,19 @@ jobs: | |
env: | ||
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }} | ||
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 }} | ||
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | ||
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | ||
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | ||
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | ||
|
||
- name: JReleaser output | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact | ||
path: | | ||
|
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 |
---|---|---|
|
@@ -76,4 +76,4 @@ deploy: | |
|
||
announce: | ||
twitter: | ||
active: release | ||
active: RELEASE |