Skip to content

Commit

Permalink
[TH2-4210] Add commit hash in dev build releases
Browse files Browse the repository at this point in the history
  • Loading branch information
georgiano committed Sep 21, 2022
1 parent 5bd59c6 commit 33506ed
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/dev-java-publish-sonatype.yml
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]
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}

0 comments on commit 33506ed

Please sign in to comment.