diff --git a/.github/workflows/pass-complete-release.yml b/.github/workflows/pass-complete-release.yml index fdab2df..0537f98 100644 --- a/.github/workflows/pass-complete-release.yml +++ b/.github/workflows/pass-complete-release.yml @@ -85,18 +85,16 @@ jobs: run: | echo "ALL_JAVA_REPOS_TAG_EXISTS=${{ env.MAIN_TAG_EXISTS && env.PASS_CORE_TAG_EXISTS && env.PASS_SUPPORT_TAG_EXISTS }}" >> $GITHUB_ENV + # Note that the Java Repositories uses --force on tagging and pushing tagging. This is to cover the case where + # there is a failure during the Push commits and tags step, then the workflow is re-run, we will update any tag + # that made it to the remote to the new commit created when updating the version. - name: Set Release/commit/tag ~ Java Repositories if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }} run: | - [[ -z $MAIN_TAG_EXISTS ]] && \ - (cd main && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit -am "Update version to $RELEASE" && git tag $RELEASE) || \ - echo "main already has tag $RELEASE" - [[ -z $PASS_CORE_TAG_EXISTS ]] && \ - (cd combined/pass-core && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit -am "Update version to $RELEASE" && git tag $RELEASE) || \ - echo "pass-core already has tag $RELEASE" - [[ -z $PASS_SUPPORT_TAG_EXISTS ]] && \ - (cd combined/pass-support && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit -am "Update version to $RELEASE" && git tag $RELEASE) || \ - echo "pass-support already has tag $RELEASE"; + (cd main && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) + (cd combined && mvn versions:set -B -ntp -DnewVersion=$RELEASE) + (cd combined/pass-core && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) + (cd combined/pass-support && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) # - name: Release Java modules # if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }} @@ -121,9 +119,9 @@ jobs: # - name: Push the Release commits and tags ~ Java Repositories # if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }} # run: | -# (cd main && git push origin && git push origin --tags) -# (cd combined/pass-core && git push origin && git push origin --tags) -# (cd combined/pass-support && git push origin && git push origin --tags) +# (cd main && git push origin && git push origin --force --tags) +# (cd combined/pass-core && git push origin && git push origin --force --tags) +# (cd combined/pass-support && git push origin && git push origin --force --tags) - name: Set Release/commit/tag ~ pass-ui if: ${{ ! env.PASS_UI_TAG_EXISTS }} @@ -209,7 +207,7 @@ jobs: # docker push ghcr.io/eclipse-pass/pass-journal-loader:$NEXT # docker push ghcr.io/eclipse-pass/pass-nihms-loader:$NEXT # -# - name: Push the Snapshot commits and tags ~ Java Repositories +# - name: Push the Snapshot commits ~ Java Repositories # run: | # (cd main && git push origin) # (cd combined/pass-core && git push origin) @@ -233,7 +231,7 @@ jobs: # - name: Push Snapshot Docker images to GHCR ~ pass-ui # run: docker push ghcr.io/eclipse-pass/pass-ui:$NEXT # -# - name: Push the Snapshot commits and tags ~ pass-ui +# - name: Push the Snapshot commits ~ pass-ui # run: cd combined/pass-ui && git push origin - name: Set Snapshot/commit ~ pass-acceptance-testing @@ -244,7 +242,7 @@ jobs: env: RELEASE: ${{ env.NEXT }} -# - name: Push the Snapshot commits and tags ~ pass-acceptance-testing +# - name: Push the Snapshot commits ~ pass-acceptance-testing # run: cd combined/pass-acceptance-testing && git push origin - name: Set Snapshot/commit ~ pass-docker @@ -262,7 +260,7 @@ jobs: # docker push ghcr.io/eclipse-pass/demo-ldap:$NEXT # docker push ghcr.io/eclipse-pass/idp:$NEXT # -# - name: Push the Snapshot commits and tags ~ pass-docker +# - name: Push the Snapshot commits ~ pass-docker # run: cd combined/pass-docker && git push origin # - name: Create GitHub main release