Skip to content

Commit 1dfc4ee

Browse files
committed
chore(release): GHA workflow updates
1 parent 3d283fc commit 1dfc4ee

File tree

3 files changed

+10
-61
lines changed

3 files changed

+10
-61
lines changed

.github/workflows/generate-changelog.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ name: Publish to npm
66
# * for 'main' branch
77
on:
88
push:
9-
branches:
10-
- main
119
tags:
1210
- 'v*.*.*' # Trigger only on version tags like v1.0.0
1311

.github/workflows/tag-release.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,22 @@ jobs:
4444
git config user.email "[email protected]"
4545
4646
- name: Bump the tag version
47-
id: create_branch
48-
# --no-git-tag-version ensures we control when tags are pushed
49-
# git fetch origin main
50-
# git checkout -b release/bump-tag-version origin/main
47+
id: bump_npm_version
5148
run: |
5249
npm version ${{ github.event.inputs.release_type }} -m "chore(release): bump tag version to %s"
53-
# --follow-tags is not used when pushing the branch in the next step since we're using --no-git-tag-version here
54-
55-
# - name: Commit version bump
56-
# run: |
57-
# git add package.json
58-
# git commit -m "chore(release): bump tag version to $(jq -r .version package.json)" || echo "No changes to commit"
59-
# git push origin release/bump-tag-version
60-
61-
# Duplicate
62-
# - name: Configure Git credentials
63-
# run: |
64-
# git config --global url."https://github.com/".insteadOf "[email protected]:"
65-
# git config --global credential.helper store
6650
6751
# - name: Debug Git state
6852
# run: |
6953
# git remote -v
7054
# git branch
7155
# git config --list
7256

57+
- name: Extract the new version from package.json
58+
id: capture_version
59+
run: |
60+
VERSION=$(jq -r .version package.json)
61+
echo "new_version=${VERSION}" >> $GITHUB_OUTPUT
62+
7363
- name: Generate changelog
7464
continue-on-error: true
7565
run: ./update_changelog.sh
@@ -80,11 +70,11 @@ jobs:
8070
GITHUB_TOKEN:
8171
with:
8272
token: ${{ secrets.GITHUB_TOKEN }}
83-
branch: "release/bump-tag-version"
84-
#branch-suffix: "short-commit-hash"
73+
branch: "release/bump-tag-version-and-update-changelog"
74+
branch-suffix: "short-commit-hash"
8575
base: "main"
8676
title: "chore(release): Bump tag version and update changelog"
8777
commit-message: "chore(release): Bump tag version and update changelog"
8878
body: |
89-
This pull request bumps the tag version to $(jq -r .version package.json) and updates changelog as part of the release process.
79+
This pull request bumps the tag version to ${{ steps.capture_version.outputs.new_version }} and updates changelog as part of the release process.
9080
Please review and merge.

0 commit comments

Comments
 (0)