-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gha): use gitflow maven plugin
- Loading branch information
Showing
8 changed files
with
146 additions
and
171 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- release/* | ||
- support/* | ||
paths-ignore: | ||
- "README.adoc" | ||
- "CHANGELOG.adoc" | ||
- ".github/**" | ||
- "!.github/workflows/build.yml" | ||
- "!.github/workflows/_reusable_build.yml" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/_reusable_build.yml | ||
with: | ||
ossrh-publication: true | ||
secrets: inherit |
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: Build Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- release/* | ||
- support/* | ||
paths-ignore: | ||
- "README.adoc" | ||
- "CHANGELOG.adoc" | ||
- ".github/**" | ||
- "!.github/workflows/build_pr.yml" | ||
- "!.github/workflows/_reusable_build.yml" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/_reusable_build.yml | ||
with: | ||
ossrh-publication: false | ||
secrets: inherit |
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 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "Tag to publish" | ||
type: string | ||
required: true | ||
default: "x.y.z" | ||
|
||
jobs: | ||
build: | ||
name: Publication pipeline | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
|
||
- uses: Keeper-Security/ksm-action@v1 | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | ||
secrets: | | ||
${{ vars.KEEPER_OSSRH_RECORD_ID }}/field/login > env:MAVEN_USERNAME | ||
${{ vars.KEEPER_OSSRH_RECORD_ID }}/field/password > env:MAVEN_PASSWORD | ||
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/custom_field/gpg-private-key > env:GPG_PRIVATE_KEY | ||
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/field/password > env:MAVEN_GPG_PASSPHRASE | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | ||
server-username: MAVEN_USERNAME # env variable for username in deploy | ||
server-password: MAVEN_PASSWORD | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
gpg-private-key: ${{ env.GPG_PRIVATE_KEY }} # Value of the GPG private key to import | ||
|
||
- name: Publish tag | ||
run: ./mvnw -ntp --batch-mode deploy -Pdeploy |
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 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to release (leave empty to use pom version) | ||
type: string | ||
default: "" | ||
required: false | ||
nextVersion: | ||
description: "Next development version (leave empty to use default version incrementation policy)" | ||
type: string | ||
required: false | ||
default: "" | ||
skipMergeReleaseInMaster: | ||
description: "Skip merge into master (major/minor version only should be merged)" | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
build: | ||
name: Release pipeline | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
|
||
- uses: bonitasoft/git-setup-action@v1 | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | ||
|
||
- name: Create Release | ||
run: ./mvnw -ntp --batch-mode -Dstyle.color=always gitflow:release -DgitFlowConfig.developmentBranch=${{ github.ref_name }} -DdevelopmentVersion=${{ github.event.inputs.nextVersion }} -DreleaseVersion=${{ github.event.inputs.version }} -DskipReleaseMergeProdBranch=${{ github.event.inputs.skipMergeReleaseInMaster }} -Dverbose |
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