Skip to content
Merged
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
18 changes: 15 additions & 3 deletions .github/workflows/build-version-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,22 @@ jobs:
if git diff --staged --quiet; then
echo "No version changes to commit"
else
git commit -m "🤖 Auto-increment build number to $BUILD_NUMBER [skip ci]"
# For pull requests, we need special handling
if [[ "$GITHUB_REF" == refs/pull/* ]]; then
# For pull requests, we can't push directly
echo "This is a pull request. Version increment will be applied when merged."
else
# For regular pushes to branches, we can create/update the branch
git fetch origin
git checkout -b temp-branch
git branch -f "${GITHUB_REF#refs/heads/}" temp-branch
git checkout "${GITHUB_REF#refs/heads/}"

# The GITHUB_TOKEN will be used automatically with the configured permissions
git push
git commit -m "🤖 Auto-increment build number to $BUILD_NUMBER [skip ci]"

# The GITHUB_TOKEN will be used automatically with the configured permissions
git push
fi
fi

- name: Archive production artifacts
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "portfolio-sim",
"private": true,
"version": "1.2.0",
"version": "1.2.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down