Skip to content

Commit a6b6638

Browse files
committed
chore: Update fetch-depth in GitHub Actions workflow to fetch all history for all branches and tags
1 parent ae84f32 commit a6b6638

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0 # Fetch all history for all branches and tags
1416

1517
- name: Set up Node.js
1618
uses: actions/setup-node@v3
@@ -27,12 +29,14 @@ jobs:
2729
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
2830

2931
- name: Commit and push version change
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3034
run: |
3135
git config --global user.name 'github-actions'
3236
git config --global user.email 'github-actions@github.com'
3337
git add package.json
3438
git commit -m "Update version to ${{ github.event.release.tag_name }}"
35-
git push
39+
git push origin HEAD:master # Push changes to the master branch
3640
3741
- name: Publish to npm
3842
env:

0 commit comments

Comments
 (0)