Skip to content

Package Release Workflow Fixes #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
type: string
required: true
description: "Tag version to be published"
last_tag:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this? we don't need the release log to be generated right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using Mike Penze's github action and it requires a value for the fromTag input.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are creating the release docs ourselves, do we still need this?

Copy link
Collaborator Author

@bpolania bpolania Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That action is for releasing the npm package, I mean, I don't think it's related with the docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Draco's suggestion. Since we have created the release by ourselves, some configuration needs to change.

  • Build Changelog is the step to build a change log. We can remove it and include the configuration file.
  • Create Release, we can remove with args and follow a simple code example to create a release:.
 name: "Build Changelog"
  id: build_changelog
  uses: mikepenz/release-changelog-builder-action@{latest-release}

type: string
description: "last tag name"
required: true

permissions:
contents: write
Expand Down Expand Up @@ -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 }}
19 changes: 2 additions & 17 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -123,23 +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_name: "@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:
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}}"
Expand Down
Loading