Skip to content

Conversation

@1spyral
Copy link
Member

@1spyral 1spyral commented Oct 6, 2025

Closes #765

Creates a GitHub Actions workflow that builds and publishes a release when triggered manually.
The workflow:

  • Updates lib/semian/version.rb, Gemfile.lock, CHANGELOG.md and commits them
    • CHANGELOG.md contains a list of commits with merge, dependabot, and version bumping filtered out
  • Tags the commit with the next version, determined by workflow input parameter (major, minor, patch)
  • Creates and publishes a release, filtering dependabot PRs

How to trigger a manual workflow

Testing:

Reviewers: you can leave a comment on this PR if you wish to be added as a Contributor to my fork, where you can test the workflow with minimal setup of your own

Copy link
Contributor

@AbdulRahmanAlHamali AbdulRahmanAlHamali left a comment

Choose a reason for hiding this comment

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

Looks great! I added a couple of comments. Also, I did a bit of research and found this:

https://github.com/semantic-release/semantic-release

They're doing some of the work we're doing here, and I'm wondering whether we could leverage some of it instead of reinventing the wheel (this would require changing some of our workflow, but this might be good)

(oh and one more thing, could you also update RELEASE.md)?

release_type:
description: Type of release
required: true
default: patch
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove the default to prompt the user to give this more thought

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried that, but it just defaults to the first one (major) instead

echo "Current version: $current_version"
-
name: Calculate new version
id: new_version
Copy link
Contributor

Choose a reason for hiding this comment

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

At the end of this step, could the action show the version and ask the user to confirm it is correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll look into this

.github/scripts/update_changelog.sh \
"${{ needs.read-version.outputs.new_version }}" \
"${{ needs.read-version.outputs.current_version }}"
-
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we display the git diff here for the user to confirm before we commit?

with:
ruby-version: "3.4"
bundler-cache: true
-
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these probably need to be done before we create the tag. The tag is what triggers the upload to the rubygems (in our internal tooling), so these steps should probably happen before?

@AbdulRahmanAlHamali AbdulRahmanAlHamali merged commit 7f6c384 into Shopify:main Oct 22, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run releases through Github Actions

2 participants