From 87a83bb2597f9b89ab8fcc1874d4d4fc993baa00 Mon Sep 17 00:00:00 2001 From: bpolania Date: Fri, 4 Apr 2025 15:05:28 -0700 Subject: [PATCH 1/3] Fixes --- .github/workflows/create-release.yml | 6 +++++- .github/workflows/publish-package.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 08fbd773..adf86aa7 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -7,6 +7,10 @@ on: type: string required: true description: "Tag version to be published" + last_tag: + type: string + description: "last tag name" + required: true permissions: contents: write @@ -50,6 +54,6 @@ jobs: uses: mikepenz/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 with: body: ${{steps.github_release.outputs.changelog}} - tag_version: ${{ inputs.tag_version }} + tag_name: ${{ inputs.tag_version }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish-package.yaml b/.github/workflows/publish-package.yaml index ff94d49b..bb4a9b23 100644 --- a/.github/workflows/publish-package.yaml +++ b/.github/workflows/publish-package.yaml @@ -134,7 +134,7 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && needs.fail_if_version_is_same.outputs.IS_PUBLISH_CORE_SDK == 'true'}} uses: ./.github/workflows/create-release.yml with: - tag_name: "@story-protocol/core-sdk@${{ needs.print_version_to_publish.outputs.CORE_SDK_VERSION_TO_BE_PUBLISHED }}" + tag_version: "@story-protocol/core-sdk@${{ needs.print_version_to_publish.outputs.CORE_SDK_VERSION_TO_BE_PUBLISHED }}" is_core_sdk: true last_tag: ${{ needs.fetch_last_tag.outputs.CORE_SDK_LATEST_TAG }} From 97746c27657eec8e40838fa18ee258360d770dbe Mon Sep 17 00:00:00 2001 From: bpolania Date: Fri, 4 Apr 2025 15:10:05 -0700 Subject: [PATCH 2/3] Update publish-package.yaml --- .github/workflows/publish-package.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-package.yaml b/.github/workflows/publish-package.yaml index bb4a9b23..e3317c95 100644 --- a/.github/workflows/publish-package.yaml +++ b/.github/workflows/publish-package.yaml @@ -135,7 +135,6 @@ jobs: uses: ./.github/workflows/create-release.yml with: tag_version: "@story-protocol/core-sdk@${{ needs.print_version_to_publish.outputs.CORE_SDK_VERSION_TO_BE_PUBLISHED }}" - is_core_sdk: true last_tag: ${{ needs.fetch_last_tag.outputs.CORE_SDK_LATEST_TAG }} send_slack_notif-core-sdk: From e545d3e8defaabee767c28e6fbea2b57bbc80fab Mon Sep 17 00:00:00 2001 From: bpolania Date: Fri, 25 Apr 2025 14:14:02 -0700 Subject: [PATCH 3/3] Update publish-package.yaml --- .github/workflows/publish-package.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish-package.yaml b/.github/workflows/publish-package.yaml index e3317c95..45fe8dd9 100644 --- a/.github/workflows/publish-package.yaml +++ b/.github/workflows/publish-package.yaml @@ -82,7 +82,7 @@ jobs: id: get_last_tag run: | git fetch --tags - CORE_SDK_LATEST_TAG=$(git tag --sort=creatordate | grep -E "@story-protocol/core-sdk|core-sdk" | tail -n1) + CORE_SDK_LATEST_TAG=$(git tag --sort=creatordate | grep -E "@story-protocol/core-sdk|core-sdk|^v[0-9]" | tail -n1) echo "CORE_SDK_LATEST_TAG=$CORE_SDK_LATEST_TAG" >> $GITHUB_OUTPUT echo "Last tag for @story-protocol/core-sdk is $CORE_SDK_LATEST_TAG" @@ -123,22 +123,8 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - create-release-core-sdk: - needs: - [ - build-test-publish, - fetch_last_tag, - fail_if_version_is_same, - print_version_to_publish, - ] - if: ${{ github.event_name == 'workflow_dispatch' && needs.fail_if_version_is_same.outputs.IS_PUBLISH_CORE_SDK == 'true'}} - uses: ./.github/workflows/create-release.yml - with: - tag_version: "@story-protocol/core-sdk@${{ needs.print_version_to_publish.outputs.CORE_SDK_VERSION_TO_BE_PUBLISHED }}" - last_tag: ${{ needs.fetch_last_tag.outputs.CORE_SDK_LATEST_TAG }} - send_slack_notif-core-sdk: - needs: [print_version_to_publish, create-release-core-sdk] + needs: [print_version_to_publish] uses: storyprotocol/gha-workflows/.github/workflows/reusable-slack-notifs.yml@main with: short-desc: "${{ github.repository }}: @story-protocol/core-sdk package has been published to NPM Registry, version: ${{ needs.print_version_to_publish.outputs.CORE_SDK_VERSION_TO_BE_PUBLISHED}}"