-
Notifications
You must be signed in to change notification settings - Fork 25
Cleanup Publish Workflow #459
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
base: development
Are you sure you want to change the base?
Conversation
Enables creating pre-release tags from any branch with configurable version numbers and types (alpha/beta/rc), with dry-run support for safe testing before publishing.
1. Rename `deploy.yml` to `publish.yml` for GH Actions to match other kit libraries 2. Update title 3. Add version validation 4. Update docs
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
|
||
| - name: Validate versions match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only difference here is this validate task
| run: | | ||
| PODSPEC_VERSION=$(grep -E "s.version\s*=\s*" ShopifyCheckoutSheetKit.podspec | sed -E 's/.*"([^"]+)".*/\1/') | ||
| SWIFT_VERSION=$(grep -E "public let version = " Sources/ShopifyCheckoutSheetKit/ShopifyCheckoutSheetKit.swift | sed -E 's/.*"([^"]+)".*/\1/') | ||
| GIT_TAG="${{ github.event.release.tag_name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could be very defensive against failing to extract these vars, and do something like
if [ -z "$PODSPEC_VERSION" ]; then
echo "Error: Could not extract version from ShopifyCheckoutSheetKit.podspec"
echo "Expected format: s.version = \"X.Y.Z\""
exit 1
fi
if [ -z "$SWIFT_VERSION" ]; then
echo "Error: Could not extract version from ShopifyCheckoutSheetKit.swift"
echo "Expected format: public let version = \"X.Y.Z\""
exit 1
fiBut feels alright as it is
What changes are you making?
deploy.ymltopublish.ymlfor GH Actions to match otherkit libraries
Before you merge
Important
Releasing a new version of the kit?
podspecfile.Releasing a new major version?
Tip
See the Contributing documentation for instructions on how to publish a new version of the library.