diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a621c0..a6e53f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,26 +4,9 @@ on: types: [published] jobs: - build: - runs-on: ubuntu-latest - name: Build & Compile - steps: - - uses: actions/checkout@v3 - - run: chmod +x ./gradlew - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 17 - - uses: gradle/gradle-build-action@v2 - id: compile - with: - arguments: compileJava - publish: runs-on: ubuntu-latest - name: Publish Snapshot - needs: - - build + name: Publish Release steps: - uses: actions/checkout@v3 - run: chmod +x ./gradlew @@ -31,8 +14,8 @@ jobs: with: distribution: temurin java-version: 17 - - uses: gradle/gradle-build-action@v2 - if: needs.build.result == 'success' + - uses: gradle/gradle-build-action@v2.9.0 + if: github.ref_type == 'tag' env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_CENTRAL_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_CENTRAL_PASSWORD }} @@ -40,13 +23,12 @@ jobs: ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.PGP_KEYID }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSKEY }} with: - arguments: publish + arguments: publish -Pversion=${{ github.ref_name }} notify: name: Discord Notification runs-on: ubuntu-latest needs: - - build - publish if: ${{ always() }} steps: