Skip to content

Commit

Permalink
Updated release-artifacts to allow for workflow_dispatch long-term.
Browse files Browse the repository at this point in the history
Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
  • Loading branch information
rbarkerSL committed May 17, 2024
1 parent ff4e332 commit 5166577
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
version:
type: string
description: Fake version
description: Test Version String (No release to Maven Central)
required: true

defaults:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
id: tag
run: echo "version=${GITHUB_REF#refs/tags/v}" >> "${GITHUB_OUTPUT}"

- name: Retrieve Tag Version (dispatch)
- name: Retrieve Tag Version (workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
id: workflow_tag
run: echo "version=${{github.event.inputs.version}}" >> "${GITHUB_OUTPUT}"
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
exit 1
fi
- name: Validate Release (dispatch)
- name: Validate Release (workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
if [[ "${{ steps.workflow_tag.outputs.version }}" != "${{github.event.inputs.version}}" ]]; then
Expand Down Expand Up @@ -132,13 +132,25 @@ jobs:
run: ./gradlew assemble :sdk:javadoc -Dfile.encoding=UTF-8 --scan

- name: Nexus Release
#run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
if: ${{ github.event_name == 'push' }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}

- name: Nexus Release (workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: ./gradlew publishToSonatype closeSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}

- name: Nexus Release sdk-full artifacts
if: ${{ github.event_name == 'push' }}
run: |
# This is a temporary fix and should be removed once https://github.com/hashgraph/hedera-sdk-java/pull/1732 is merged
sed -i 's#sdk\.gradle#sdk-full.gradle#g' sdk/build.gradle
git clean -fdx
./gradlew publishToSonatype closeSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
# ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
- name: Nexus Release sdk-full artifacts (workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
# This is a temporary fix and should be removed once https://github.com/hashgraph/hedera-sdk-java/pull/1732 is merged
sed -i 's#sdk\.gradle#sdk-full.gradle#g' sdk/build.gradle
git clean -fdx
./gradlew publishToSonatype closeSonatypeStagingRepository --no-parallel -Dfile.encoding=UTF-8 --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}

0 comments on commit 5166577

Please sign in to comment.