-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TH2-4210] Add commit hash in dev build releases
- Loading branch information
Showing
1 changed file
with
12 additions
and
10 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 |
---|---|---|
@@ -1,23 +1,26 @@ | ||
name: Dev build and publish Java distributions to sonatype snapshot repository | ||
name: Dev build and publish Docker distributions to Github Container Registry ghcr.io | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
- version-* | ||
# paths: | ||
# - gradle.properties | ||
- master | ||
- version-* | ||
# paths: | ||
# - gradle.properties | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# Prepare custom build version | ||
# Prepare custom build version | ||
- name: Get branch name | ||
id: branch | ||
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/} | ||
- name: Get SHA of the commit | ||
id: sha | ||
run: echo ::set-output name=sha_short::$(git rev-parse --short HEAD) | ||
- name: Get release_version | ||
id: ver | ||
uses: christian-draeger/[email protected] | ||
|
@@ -26,7 +29,7 @@ jobs: | |
property: release_version | ||
- name: Build custom release version | ||
id: release_ver | ||
run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}-SNAPSHOT" | ||
run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}-${{ steps.sha.outputs.sha_short }}-SNAPSHOT" | ||
- name: Write custom release version to file | ||
uses: christian-draeger/[email protected] | ||
with: | ||
|
@@ -35,7 +38,7 @@ jobs: | |
value: ${{ steps.release_ver.outputs.value }} | ||
- name: Show custom release version | ||
run: echo ${{ steps.release_ver.outputs.value }} | ||
# Build and publish package | ||
# Build and publish package | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
|
@@ -46,5 +49,4 @@ jobs: | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} | ||
|
||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} |