Skip to content

Commit 14034df

Browse files
committed
chore: enhance publish-package.yml workflow by adding branch name retrieval and updating git push command to use the correct branch reference
1 parent 3c6fb2d commit 14034df

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/publish-package.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,19 @@ jobs:
7272
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
7373
echo "tag=create-tbk-app-v$NEW_VERSION" >> $GITHUB_OUTPUT
7474
75+
- name: Get branch name
76+
id: branch
77+
run: |
78+
# Get the actual branch name from git (works for workflow_dispatch)
79+
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
80+
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
81+
echo "Current branch: $BRANCH_NAME"
82+
7583
- name: Commit version bump
7684
run: |
7785
git add packages/create-tbk-app/package.json
7886
git commit -m "chore(create-tbk-app): bump version to ${{ steps.bump-version.outputs.version }}"
79-
git push origin HEAD:${{ github.ref_name }}
87+
git push origin ${{ steps.branch.outputs.branch }}
8088
8189
- name: Build package
8290
working-directory: packages/create-tbk-app
@@ -88,7 +96,7 @@ jobs:
8896
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8997
run: |
9098
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
91-
pnpm publish --access public
99+
pnpm publish --access public --no-git-checks
92100
rm .npmrc
93101
94102
- name: Create git tag

0 commit comments

Comments
 (0)