Skip to content

Commit c128c18

Browse files
gh-actions: use sha
1 parent df08004 commit c128c18

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/bump-and-publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55

66
jobs:
77
bump:
8+
outputs:
9+
new_sha: ${{ steps.sha.outputs.SHA }}
810
runs-on: ubuntu-latest
911
steps:
1012
- name: Check out the repository
@@ -41,7 +43,13 @@ jobs:
4143
github_token: ${{ secrets.GITHUB_TOKEN }}
4244
branch: ${{ github.ref }}
4345
tags: true
44-
46+
47+
- name: get sha
48+
id: sha
49+
run: |
50+
sha_new=$(git rev-parse HEAD)
51+
echo $sha_new
52+
echo "::set-output name=SHA::$sha_new"
4553
4654
publish:
4755
needs: bump
@@ -51,7 +59,7 @@ jobs:
5159
uses: actions/checkout@v4
5260
with:
5361
fetch-depth: 0
54-
fetch-tags: true
62+
ref: ${{ needs.bump.outputs.new_sha }}
5563

5664
- name: Set up Python
5765
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)