Skip to content

Commit 074c3b6

Browse files
committed
xzsc
1 parent b741a23 commit 074c3b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ jobs:
7878
shell: bash
7979
id: create-build-number
8080
run: |
81-
git fetch --unshallow origin
81+
git fetch --unshallow origin main
82+
git fetch --unshallow origin ${{ github.ref_name }}
8283
echo $(git rev-list HEAD --count --first-parent)
83-
echo $(git rev-list --count ${{ github.ref_name }} ^main)
84-
echo "build-number=$(git rev-list --count ${{ github.ref_name }} ^main)" >> GITHUB_OUTPUT
84+
echo $(git rev-list --count origin/${{ github.ref_name }} ^origin/main)
85+
echo "build-number=$(git rev-list --count origin/${{ github.ref_name }} ^origin/main)" >> GITHUB_OUTPUT
8586
- name: 'Format version'
8687
id: format-version
8788
uses: ./.github/actions/format-version

0 commit comments

Comments
 (0)