Skip to content

Commit d097b51

Browse files
committed
Update release commit
1 parent b40bfea commit d097b51

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

‎.github/workflows/create-release.yml‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version_type:
7-
description: 'Version type'
7+
description: "Version type"
88
required: true
9-
default: 'patch'
9+
default: "patch"
1010
type: choice
1111
options:
1212
- major
@@ -16,37 +16,37 @@ on:
1616
jobs:
1717
create-release:
1818
runs-on: ubuntu-latest
19-
19+
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
2323
with:
2424
ref: main
2525
fetch-depth: 0
2626
token: ${{ secrets.ACTIONS_TOKEN }}
27-
27+
2828
- name: Setup Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: '3.12'
32-
31+
python-version: "3.12"
32+
3333
- name: Install uv
3434
uses: astral-sh/setup-uv@v6
35-
35+
3636
- name: Get current version
3737
id: current-version
3838
run: |
3939
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
4040
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
41-
41+
4242
- name: Calculate new version
4343
id: new-version
4444
run: |
4545
CURRENT_VERSION="${{ steps.current-version.outputs.current_version }}"
4646
VERSION_TYPE="${{ inputs.version_type }}"
47-
47+
4848
IFS='.' read -r major minor patch <<< "$CURRENT_VERSION"
49-
49+
5050
case "$VERSION_TYPE" in
5151
major)
5252
major=$((major + 1))
@@ -61,50 +61,50 @@ jobs:
6161
patch=$((patch + 1))
6262
;;
6363
esac
64-
64+
6565
NEW_VERSION="${major}.${minor}.${patch}"
6666
BRANCH_NAME="release/${NEW_VERSION}"
67-
67+
6868
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
6969
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
70-
70+
7171
- name: Configure Git
7272
run: |
7373
git config user.name "github-actions[bot]"
7474
git config user.email "github-actions[bot]@users.noreply.github.com"
75-
75+
7676
- name: Update main branch version
7777
run: |
7878
CURRENT_VERSION="${{ steps.current-version.outputs.current_version }}"
7979
NEW_VERSION="${{ steps.new-version.outputs.new_version }}"
80-
80+
8181
echo "Updating main branch version from $CURRENT_VERSION to $NEW_VERSION"
82-
82+
8383
# Update version in pyproject.toml
8484
sed -i "s/^version = \"$CURRENT_VERSION\"/version = \"$NEW_VERSION\"/" pyproject.toml
85-
85+
8686
# Update lock file
8787
uv sync --all-extras
88-
88+
8989
# Commit and push to main
9090
git add pyproject.toml
91-
git commit -m "Bump version from $CURRENT_VERSION to $NEW_VERSION"
91+
git commit -m "Release v$NEW_VERSION"
9292
git push origin main
93-
93+
9494
- name: Create release branch
9595
run: |
9696
BRANCH_NAME="${{ steps.new-version.outputs.branch_name }}"
97-
97+
9898
echo "Creating release branch: $BRANCH_NAME"
99-
99+
100100
# Create new branch from updated main
101101
git checkout -b "$BRANCH_NAME"
102-
102+
103103
# Push the release branch
104104
git push origin "$BRANCH_NAME"
105-
105+
106106
echo "✅ Release branch created: $BRANCH_NAME"
107-
107+
108108
- name: Create summary
109109
run: |
110110
echo "## 🚀 Python SDK Release Created" >> $GITHUB_STEP_SUMMARY
@@ -116,4 +116,4 @@ jobs:
116116
echo "### Next Steps" >> $GITHUB_STEP_SUMMARY
117117
echo "The PyPI package will be automatically published when the release branch is pushed." >> $GITHUB_STEP_SUMMARY
118118
echo "" >> $GITHUB_STEP_SUMMARY
119-
echo "Monitor the publish workflow: [View Workflows](https://github.com/RoboFinSystems/robosystems-python-client/actions/workflows/publish.yml)" >> $GITHUB_STEP_SUMMARY
119+
echo "Monitor the publish workflow: [View Workflows](https://github.com/RoboFinSystems/robosystems-python-client/actions/workflows/publish.yml)" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)