From 3e398b569b161cd90c487f7c15b56a2926deda7e Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Mon, 17 Jun 2024 09:59:50 -0500 Subject: [PATCH 1/7] Updated CODEOWNERS to include devops-ci Signed-off-by: Roger Barker --- .github/CODEOWNERS | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b89c2e07b..4a89badc2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,23 +8,23 @@ # NOTE: Must be placed last to ensure enforcement over all other rules # Protection Rules for Github Configuration Files and Actions Workflows -/.github/ @hashgraph/release-engineering @hashgraph/release-engineering-managers -/.github/workflows/ @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +/.github/ @hashgraph/devops-ci @hashgraph/release-engineering-managers +/.github/workflows/ @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers # Codacy Tool Configurations -/config/ @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers -.remarkrc @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +/config/ @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +.remarkrc @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers # Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval) -/CODEOWNERS @hashgraph/release-engineering @hashgraph/release-engineering-managers +/CODEOWNERS @hashgraph/release-engineering-managers # Protect the repository root files -/README.md @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers -**/LICENSE @hashgraph/release-engineering @hashgraph/release-engineering-managers +/README.md @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +**/LICENSE @hashgraph/release-engineering-managers # CodeCov configuration -**/codecov.yml @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +**/codecov.yml @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers # Git Ignore definitions -**/.gitignore @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers -**/.gitignore.* @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +**/.gitignore @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers +**/.gitignore.* @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers From 5242fe2def462ffe4c33b4976451daf6779c2085 Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Fri, 21 Jun 2024 13:14:41 -0500 Subject: [PATCH 2/7] added debug info to the tag extraction steps Signed-off-by: Roger Barker --- .github/workflows/publish_release.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 9a7171340..8b9d4e2a4 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -67,6 +67,7 @@ jobs: - name: Extract Tag Information id: tag run: | + set -x REF_NAME="$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" IS_VALID_SEMVER="$(semver validate "${REF_NAME}")" @@ -102,9 +103,13 @@ jobs: echo "version=${FINAL_VERSION}" >>"${GITHUB_OUTPUT}" echo "prerelease=${IS_PRERELEASE}" >>"${GITHUB_OUTPUT}" echo "type=${PREREL_TYPE}" >>"${GITHUB_OUTPUT}" + + set +x - name: Validate Tag and Package Versions run: | + set -x + COMPARISON_RESULT="$(semver compare "${{ steps.npm-package.outputs.version }}" "${{ steps.tag.outputs.version }}")" if [[ "${COMPARISON_RESULT}" -ne 0 ]]; then echo "::error title=Version Mismatch::The version in package.json (${{ steps.npm-package.outputs.version }}) does not match the version in the tag (${{ steps.tag.outputs.version }})." @@ -120,7 +125,8 @@ jobs: echo "::error title=Unsupported PreRelease::The tag '${{ steps.tag.outputs.name }}' is an unsupported prerelease tag. Only 'beta' prereleases are supported." exit 2 fi - + + set +x run-safety-checks: name: Safety Checks runs-on: [self-hosted, Linux, medium, ephemeral] From a20fa6e56423c356eb2294f3c02623e21573ac9b Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Fri, 21 Jun 2024 13:21:30 -0500 Subject: [PATCH 3/7] Added extra echo Signed-off-by: Roger Barker --- .github/workflows/publish_release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 8b9d4e2a4..fa5ec3b9b 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -96,6 +96,8 @@ jobs: FINAL_VERSION="${RELEASE_VERSION}" [[ -n "${PREREL_VERSION}" ]] && FINAL_VERSION="${RELEASE_VERSION}-${PREREL_VERSION}" + + echo "finalVersion="v${FINAL_VERSION}" TAG_NAME="v${FINAL_VERSION}" From 31e7892d87a94800a07e32d04b3b9cc871939cfd Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Mon, 1 Jul 2024 09:31:34 -0500 Subject: [PATCH 4/7] Updated the logic in determining publish_required for proto/crypto Logic was inverted. Signed-off-by: Roger Barker --- .github/workflows/publish_release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index efccdbe82..46d2d86d2 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -91,9 +91,9 @@ jobs: - name: Proto Subpackage Publish Required id: proto-required run: | - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/proto/${{ steps.npm-package.outputs.proto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" @@ -101,9 +101,9 @@ jobs: - name: Crypto Subpackage Publish Required id: crypto-required run: | - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/cryptography/${{ steps.npm-package.outputs.crypto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" From c773a38b48e4ca48d656ff97b5e71191a2d8c9ed Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Mon, 1 Jul 2024 09:44:16 -0500 Subject: [PATCH 5/7] Revert proto to beta.1 Signed-off-by: Roger Barker --- packages/proto/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/proto/package.json b/packages/proto/package.json index 5fd78d184..7c4a2794a 100644 --- a/packages/proto/package.json +++ b/packages/proto/package.json @@ -1,6 +1,6 @@ { "name": "@hashgraph/proto", - "version": "2.15.0-beta.2", + "version": "2.15.0-beta.1", "description": "Protobufs for the Hedera™ Hashgraph SDK", "main": "lib/index.js", "browser": "src/index.js", From 55f3d039efddba75f58a5000ffe6d3de6db03e53 Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Mon, 1 Jul 2024 09:52:18 -0500 Subject: [PATCH 6/7] Undid reversion. Signed-off-by: Roger Barker --- packages/proto/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/proto/package.json b/packages/proto/package.json index 7c4a2794a..5fd78d184 100644 --- a/packages/proto/package.json +++ b/packages/proto/package.json @@ -1,6 +1,6 @@ { "name": "@hashgraph/proto", - "version": "2.15.0-beta.1", + "version": "2.15.0-beta.2", "description": "Protobufs for the Hedera™ Hashgraph SDK", "main": "lib/index.js", "browser": "src/index.js", From 20ea2de70e20bf64cf8dc65141d4c00ee0e100b7 Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Mon, 1 Jul 2024 10:47:21 -0500 Subject: [PATCH 7/7] Updated needs clauses, reverted what i thought was inverted logic Signed-off-by: Roger Barker --- .github/workflows/publish_release.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 46d2d86d2..56f92445e 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -91,9 +91,9 @@ jobs: - name: Proto Subpackage Publish Required id: proto-required run: | - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/proto/${{ steps.npm-package.outputs.proto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" @@ -101,9 +101,9 @@ jobs: - name: Crypto Subpackage Publish Required id: crypto-required run: | - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/cryptography/${{ steps.npm-package.outputs.crypto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" @@ -300,7 +300,7 @@ jobs: - name: Calculate Proto Subpackage Publish Arguments id: proto-publish working-directory: packages/proto - if: ${{ steps.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} + if: ${{ needs.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} run: | PUBLISH_ARGS="--access public --no-git-checks" [[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run" @@ -314,7 +314,7 @@ jobs: - name: Calculate Crypto Subpackage Publish Arguments id: crypto-publish working-directory: packages/cryptography - if: ${{ steps.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} + if: ${{ needs.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} run: | PUBLISH_ARGS="--access public --no-git-checks" [[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run" @@ -341,26 +341,26 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/proto - if: ${{ steps.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} - run: task -v publish -- ${{ steps.proto-publish.outputs.args }} + if: ${{ needs.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} + run: task -v publish -- ${{ needs.proto-publish.outputs.args }} - name: Publish Cryptography Release env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/cryptography - if: ${{ steps.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} - run: task -v publish -- ${{ steps.crypto-publish.outputs.args }} + if: ${{ needs.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} + run: task -v publish -- ${{ needs.crypto-publish.outputs.args }} - name: Publish SDK Release env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: task -v publish -- ${{ steps.sdk-publish.outputs.args }} + run: task -v publish -- ${{ needs.sdk-publish.outputs.args }} - name: Generate Github Release uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 if: ${{ github.event.inputs.dry-run-enabled != 'true' && !cancelled() && !failure() }} with: - tag: ${{ steps.validate-release.outputs.tag }} + tag: ${{ needs.validate-release.outputs.tag }} prerelease: ${{ needs.validate-release.outputs.prerelease == 'true' }} draft: false generateReleaseNotes: true