From cf49bda5205d6293678e429fa207469a1739a091 Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:20:19 -0500 Subject: [PATCH 1/7] ci: test --- .github/workflows/deploy.yml | 63 ++---------------------------------- 1 file changed, 3 insertions(+), 60 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d4347a9c93f..f945343faef 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,8 @@ name: Deploy and Publish on: - workflow_run: - workflows: ["Build and Test"] - branches: [ master ] - types: - - completed + push: + branches: [ '**' ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -46,7 +43,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 12 - name: Install Semantic Release dependencies run: | @@ -67,57 +64,3 @@ jobs: run: | echo ::set-output name=IS_NEW_RELEASE::$(npx semantic-release --dry-run | grep -c -i "Published release") echo "The full TAG - ${{ github.ref }}" - - - name: Get the nextRelease.version from semantic release - if: ${{ steps.is_new_release.outputs.IS_NEW_RELEASE == '1' }} - id: next_release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: echo ::set-output name=NEXT_RELEASE::$(npx semantic-release --dry-run | grep -oP "Published release \K[0-9]+\.[0-9]+\.[0-9]+") - - - name: Publish to Git Releases and Tags - if: ${{ steps.is_new_release.outputs.IS_NEW_RELEASE == '1' }} - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release # --dry-run --branches 9662_addcheck - - - name: Publish to Maven Central - if: ${{ steps.next_release.outputs.NEXT_RELEASE }} - env: - GHA_TAG: "refs/tags/v${{ steps.next_release.outputs.NEXT_RELEASE }}" # for setMavenVersion_gha - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} # for .travis.settings.xml - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_KEYNAME: ${{ secrets.SIGNING_KEY }} - GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} - SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} # for setupSigning_gha - run: | - echo "The NEXT_RELEASE - ${{ steps.next_release.outputs.NEXT_RELEASE }}" - echo -e "\n\033[0;35mCommand: setupSigning" - build/setupSigning_gha.sh - echo -e "\n\033[0;35mCommand: setMavenVersion" - build/setMavenVersion_gha.sh - echo -e "\n\033[0;35mCommand: mvn deploy" - mvn deploy --settings build/.travis.settings.xml -DskipITs -Dskip.unit.tests -P central $MVN_ARGS - - - name: Publish Java docs - if: ${{ steps.next_release.outputs.NEXT_RELEASE }} - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - GHA_REPO_SLUG: ${{ github.repository }} - GHA_BRANCH: ${{ github.ref }} # non PR only need to get last part - GHA_PULL_REQUEST: ${{ github.event.number }} - GHA_BUILD_NUMBER: ${{ github.run_number }} - GHA_JOB_NUMBER: ${{ github.job_number }} - GHA_COMMIT: ${{ github.sha }} - GHA_TAG: "refs/tags/v${{ steps.next_release.outputs.NEXT_RELEASE }}" # for setMavenVersion_gha - run: | - build/setMavenVersion_gha.sh - mvn clean javadoc:aggregate $MVN_ARGS - build/publish_gha.sh - - - name: SKIP - Publish/Deploy to Git and Maven Central - if: ${{ steps.is_new_release.outputs.IS_NEW_RELEASE == '0' }} - run: | - echo -e "\n\033[0;35mCommand: Skipping the deployment because semantic release has determined there are no relevant changes that warrent a new release.\n" From 7a6333868179f864da1cb2f1b849735e7884f33b Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:25:09 -0500 Subject: [PATCH 2/7] ci: test --- .github/workflows/deploy.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f945343faef..49542456841 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 14 - name: Install Semantic Release dependencies run: | @@ -61,6 +61,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - echo ::set-output name=IS_NEW_RELEASE::$(npx semantic-release --dry-run | grep -c -i "Published release") - echo "The full TAG - ${{ github.ref }}" + run: npx semantic-release --dry-run From 0be6cad95e04b5b300c92d041fb0ca687a9644c6 Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:31:09 -0500 Subject: [PATCH 3/7] ci: test --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 49542456841..0d89213aa51 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -61,4 +61,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release --dry-run + run: npx semantic-release --dry-run --branches gha_test + From 3a9783af70c06f0746f7201772c183e2b8234224 Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:36:12 -0500 Subject: [PATCH 4/7] ci: test --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d89213aa51..87a480aa4d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,6 +60,7 @@ jobs: id: is_new_release env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release --dry-run --branches gha_test From 753666c6a078a455c2e64f1ea032f65f18809334 Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:45:26 -0500 Subject: [PATCH 5/7] ci: test --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87a480aa4d5..d818073acfa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -59,8 +59,8 @@ jobs: - name: Check if semantic release generated a release id: is_new_release env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TEST_TOKEN }} + GH_TOKEN: ${{ secrets.TEST_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release --dry-run --branches gha_test From 1ec61dee1e1dff256ae7b8919144cb0cbcb77e49 Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Wed, 1 Dec 2021 16:54:36 -0500 Subject: [PATCH 6/7] ci: test --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d818073acfa..87a480aa4d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -59,8 +59,8 @@ jobs: - name: Check if semantic release generated a release id: is_new_release env: - GITHUB_TOKEN: ${{ secrets.TEST_TOKEN }} - GH_TOKEN: ${{ secrets.TEST_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release --dry-run --branches gha_test From 8119aa1e1d403ed730a2b9951dbaad26a217964a Mon Sep 17 00:00:00 2001 From: Michael G Mosca Date: Thu, 2 Dec 2021 13:43:13 -0500 Subject: [PATCH 7/7] ci: fix --- .github/workflows/deploy.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87a480aa4d5..da26253672a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,11 +56,8 @@ jobs: npm install -g @semantic-release/commit-analyzer npm install -g @semantic-release/release-notes-generator - - name: Check if semantic release generated a release - id: is_new_release + - name: Publish to Git Releases and Tags env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release --dry-run --branches gha_test -