From 54245d37d6a49e470f35efc0d52fe336cea533ba Mon Sep 17 00:00:00 2001 From: Gili Tzabari Date: Wed, 30 Oct 2024 08:36:51 -0400 Subject: [PATCH] Publish new Javadoc on release --- .github/workflows/deploy_to_maven_central.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy_to_maven_central.yml b/.github/workflows/deploy_to_maven_central.yml index e57e4cc..a1bb491 100644 --- a/.github/workflows/deploy_to_maven_central.yml +++ b/.github/workflows/deploy_to_maven_central.yml @@ -72,6 +72,7 @@ jobs: TAG=$(git describe --tag --abbrev=0) echo "TAG=${TAG}" >> "$GITHUB_OUTPUT" echo "VERSION=${TAG#"release-"}" >> "$GITHUB_OUTPUT" + echo "TAG=${TAG}" - name: Look up staging profile id id: request-profile-id @@ -125,14 +126,13 @@ jobs: - name: Cache Dependencies uses: actions/cache@v4 with: - path: | - ~/.m2/repository/* + path: ~/.m2/repository/* key: "${{ runner.OS }}-maven-${{ hashFiles('**/pom.xml') }}" - name: Test build run: ./mvnw --batch-mode -V -e verify - # Escape exclamation mark on bash: https://stackoverflow.com/a/27177197/14731 + # Must quote exclamation mark on bash: https://stackoverflow.com/a/27177197/14731 - name: Deploy to Maven Central run: > ./mvnw --batch-mode -V -e -pl '!dropwizard,!jersey' @@ -151,7 +151,9 @@ jobs: - uses: actions/setup-java@v4 with: distribution: zulu - java-version: 23 + java-version: | + 8 + 23 - name: Generate Javadoc run: | @@ -163,7 +165,6 @@ jobs: git checkout gh-pages echo "INITIAL_GH_PAGES_POSITION=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" git add "${{ steps.create-tag.outputs.VERSION }}/docs/api" - git tag -a ${{ steps.create-tag.outputs.TAG }} -m "Released version ${{ steps.create-tag.outputs.VERSION }}" git push close-release: @@ -260,10 +261,4 @@ jobs: git ${{ github.ref_type }} -f ${{ github.ref_name }} fi git push -f origin ${{ github.ref_name }} - fi - - - name: Delete gh-pages' tag - if: needs.open-release.outputs.INITIAL_GH_PAGES_POSITION != '' - run: | - git push --delete origin ${{ needs.open-release.outputs.TAG }} - git push + fi \ No newline at end of file