From 4e2d584954085a0f52f57a98b0c1ad7ce53c77c0 Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Mon, 22 Feb 2021 20:41:09 +1100 Subject: [PATCH] Fix issue where release wasn't correctly assembled for tags during CI build. --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 125e0117..ea30ce30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: env: GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} - if: github.repository == 'charleskorn/kaml' && github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.repository == 'charleskorn/kaml' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' - name: Publish snapshot run: ./batect publishSnapshot @@ -56,6 +56,14 @@ jobs: GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} if: github.repository == 'charleskorn/kaml' && github.ref == 'refs/heads/main' && github.event_name == 'push' + - name: Publish release + run: ./batect publishRelease + env: + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} + GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} + if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' + - name: Create GitHub release uses: softprops/action-gh-release@v1 with: @@ -66,14 +74,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' - - name: Publish release - run: ./batect publishRelease - env: - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} - GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} - if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' - - name: Stop Gradle daemon run: ./gradlew --stop