Skip to content

Commit 21c2c13

Browse files
Release process fix
1 parent 2d0aa43 commit 21c2c13

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,8 @@ jobs:
2525
- name: Extract version from tag
2626
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
2727

28-
- name: Bump all project versions
29-
run: bash scripts/bump-version.sh "$VERSION"
30-
31-
- name: Commit and push version bump
32-
run: |
33-
git config user.name "github-actions[bot]"
34-
git config user.email "github-actions[bot]@users.noreply.github.com"
35-
git add Directory.Build.props src/Nap.VsCode/package.json src/Nap.VsCode/package-lock.json
36-
git diff --cached --quiet && echo "No version changes to commit" && exit 0
37-
git commit -m "chore: bump version to ${VERSION}"
38-
git push
28+
- name: Bump versions and push
29+
run: bash scripts/bump-version.sh "$VERSION" --commit
3930

4031
build-vsix:
4132
needs: [bump-versions]

scripts/bump-version.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ echo "==> All projects bumped to v${VERSION}"
3939
# --- Commit + push if requested ---
4040
if [ "$COMMIT" = "--commit" ]; then
4141
echo "==> Committing and pushing version bump..."
42+
# Set git identity in CI if not already configured
43+
if [ -n "${CI:-}" ]; then
44+
git config user.name "github-actions[bot]"
45+
git config user.email "github-actions[bot]@users.noreply.github.com"
46+
fi
4247
git add Directory.Build.props src/Nap.VsCode/package.json src/Nap.VsCode/package-lock.json
4348
[ -f Cargo.toml ] && git add Cargo.toml
44-
git commit -m "chore: bump version to ${VERSION}"
49+
git commit -m "release: update version to v${VERSION}"
4550
git push
4651
echo "==> Committed and pushed v${VERSION}"
4752
fi

0 commit comments

Comments
 (0)