From 7497b21beb4c8b49dca0fe6bc73cb27c643d6bd7 Mon Sep 17 00:00:00 2001 From: Russ Poetker Date: Fri, 17 May 2024 07:56:06 -0400 Subject: [PATCH] Remove snapshot tagging --- .github/actions/yarn-version/action.yml | 9 ++++++- .github/workflows/pass-complete-release.yml | 26 +++++++++------------ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/actions/yarn-version/action.yml b/.github/actions/yarn-version/action.yml index 023c5fc..12a9c28 100644 --- a/.github/actions/yarn-version/action.yml +++ b/.github/actions/yarn-version/action.yml @@ -6,6 +6,10 @@ inputs: repository_dir: description: 'Directory of repository to update' required: true + skip_tag: + description: 'Skip git tag' + required: false + default: "false" runs: using: composite @@ -20,4 +24,7 @@ runs: yarn config set version-git-tag false yarn version --new-version $RELEASE git commit --allow-empty -am "Update version to $RELEASE" - git tag --force $RELEASE_TAG + if [ "$SKIP_TAG" == "false" ]; then + echo "Tagging yarn version $RELEASE" + git tag $RELEASE + fi diff --git a/.github/workflows/pass-complete-release.yml b/.github/workflows/pass-complete-release.yml index 44961b8..aea65e0 100644 --- a/.github/workflows/pass-complete-release.yml +++ b/.github/workflows/pass-complete-release.yml @@ -17,7 +17,6 @@ jobs: env: RELEASE: ${{ inputs.releaseversion }} NEXT: ${{ inputs.nextversion }} - NEXT_TAG: ${{ inputs.nextversion }}-init steps: - name: Checkout main uses: actions/checkout@v4 @@ -143,7 +142,6 @@ jobs: repository_dir: combined/pass-ui env: RELEASE: ${{ env.RELEASE }} - RELEASE_TAG: ${{ env.RELEASE }} - name: Build Release pass-ui if: ${{ ! env.PASS_UI_TAG_EXISTS }} @@ -173,7 +171,6 @@ jobs: repository_dir: combined/pass-acceptance-testing env: RELEASE: ${{ env.RELEASE }} - RELEASE_TAG: ${{ env.RELEASE }} - name: Push the Release commits and tags ~ pass-acceptance-testing if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }} @@ -216,10 +213,10 @@ jobs: - name: Set Snapshot/commit ~ Java Repositories run: | - (cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG) + (cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT") (cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT) - (cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG) - (cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG) + (cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT") + (cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT") - name: Release Snapshot Java modules working-directory: combined @@ -241,17 +238,17 @@ jobs: - name: Push the Snapshot commits ~ Java Repositories run: | - (cd main && git push --atomic origin main --force $NEXT_TAG) - (cd combined/pass-core && git push --atomic origin main --force $NEXT_TAG) - (cd combined/pass-support && git push --atomic origin main --force $NEXT_TAG) + (cd main && git push origin main) + (cd combined/pass-core && git push origin main) + (cd combined/pass-support && git push origin main) - name: Set Snapshot/commit ~ pass-ui uses: ./main/.github/actions/yarn-version with: repository_dir: combined/pass-ui + skip_tag: "true" env: RELEASE: ${{ env.NEXT }} - RELEASE_TAG: ${{ env.NEXT_TAG }} - name: Build Snapshot pass-ui uses: ./main/.github/actions/yarn-build @@ -264,25 +261,24 @@ jobs: run: docker push ghcr.io/eclipse-pass/pass-ui:$NEXT - name: Push the Snapshot commits ~ pass-ui - run: cd combined/pass-ui && git push --atomic origin main --force $NEXT_TAG + run: cd combined/pass-ui && git push origin main - name: Set Snapshot/commit ~ pass-acceptance-testing uses: ./main/.github/actions/yarn-version with: repository_dir: combined/pass-acceptance-testing + skip_tag: "true" env: RELEASE: ${{ env.NEXT }} - RELEASE_TAG: ${{ env.NEXT_TAG }} - name: Push the Snapshot commits ~ pass-acceptance-testing - run: cd combined/pass-acceptance-testing && git push --atomic origin main --force $NEXT_TAG + run: cd combined/pass-acceptance-testing && git push origin main - name: Set Snapshot/commit ~ pass-docker run: | cd combined/pass-docker sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$NEXT/" .env git commit --allow-empty -am "Update version to $NEXT" - git tag --force $NEXT_TAG - name: Build Snapshot pass-docker images working-directory: combined/pass-docker @@ -294,4 +290,4 @@ jobs: docker push ghcr.io/eclipse-pass/idp:$NEXT - name: Push the Snapshot commits ~ pass-docker - run: cd combined/pass-docker && git push --atomic origin main --force $NEXT_TAG + run: cd combined/pass-docker && git push origin main