Skip to content

Commit

Permalink
fix: release workflow, combined into closeAndReleaseSonatypeStagingRe…
Browse files Browse the repository at this point in the history
…pository
  • Loading branch information
jonathannorris committed Jan 20, 2025
1 parent 309c4ac commit b0e5c69
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ on:
default: false
type: boolean
version-increment-type:
description: 'Which part of the version to increment:'
description: "Which part of the version to increment:"
required: true
type: choice
options:
- major
- minor
- patch
default: 'patch'
default: "patch"

permissions:
contents: write
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
with:
distribution: temurin
java-version: 11
cache: 'gradle'
cache: "gradle"

- name: Build and Publish To Sonatype
env:
Expand All @@ -82,19 +82,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToSonatype

- name: Close Sonatype Staging Repository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew findSonatypeStagingRepository closeSonatypeStagingRepository

- name: Release Sonatype Staging Repository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew findSonatypeStagingRepository releaseSonatypeStagingRepository
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
if: inputs.prerelease != true && inputs.draft != true

- uses: DevCycleHQ/release-action/[email protected]
Expand All @@ -110,4 +98,4 @@ jobs:
- name: Display link to release
run: |
echo "::notice title=Release ID::${{ steps.create-release.outputs.release-id }}"
echo "::notice title=Release URL::${{ steps.create-release.outputs.release-url }}"
echo "::notice title=Release URL::${{ steps.create-release.outputs.release-url }}"

0 comments on commit b0e5c69

Please sign in to comment.