mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Actually change the version!
Add logic to update version file and handle commits. Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
@@ -373,12 +373,24 @@ jobs:
|
||||
NEW_VERSION="${BASE_VERSION}-alpha.${NEW_ALPHA_NUM}"
|
||||
echo "New version: $NEW_VERSION"
|
||||
|
||||
# Update the version file
|
||||
sed -i "s/\"$CURRENT_VERSION\"/\"$NEW_VERSION\"/" "$VERSION_FILE"
|
||||
|
||||
# Verify the change
|
||||
echo "Updated version.rb:"
|
||||
|
||||
- name: Commit and push version bump
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add config/initializers/version.rb
|
||||
|
||||
# Check if there are changes to commit
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit - version may have already been bumped"
|
||||
exit 0
|
||||
|
||||
git commit -m "Bump version to next alpha after ${{ github.ref_name }} release"
|
||||
|
||||
# Push with retry logic
|
||||
|
||||
Reference in New Issue
Block a user