Skip to content

Commit 3bff84d

Browse files
committed
fix output of commit step
1 parent 073cbaf commit 3bff84d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Update changelog
4949
runs-on: ubuntu-latest
5050
outputs:
51-
changelog_commitish: ${{ steps.commit.outputs.commit_long_sha || github.sha }}
51+
changelog_commitish: ${{ steps.get_sha.outputs.commit_sha }}
5252

5353
steps:
5454
- name: Checkout repository
@@ -91,7 +91,16 @@ jobs:
9191
9292
- name: Get commit SHA
9393
id: get_sha
94-
run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
94+
run: |
95+
COMMIT_SHA=$(git rev-parse HEAD)
96+
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
97+
echo "Captured SHA: $COMMIT_SHA"
98+
99+
- name: Debug final SHA
100+
run: |
101+
echo "Final changelog_commitish: ${{ steps.get_sha.outputs.commit_sha }}"
102+
echo "Commit action SHA: ${{ steps.commit.outputs.commit_long_sha }}"
103+
echo "Git HEAD: $(git rev-parse HEAD)"
95104
96105
create_github_release:
97106
name: Create github release
@@ -110,7 +119,7 @@ jobs:
110119
echo "Using commit SHA: $COMMIT_SHA"
111120
- uses: actions/checkout@v4
112121
with:
113-
ref: ${{ needs.update_changelog.changelog_commitish || github.sha }}
122+
ref: ${{ needs.update_changelog.changelog_commitish }}
114123
- name: Log current commit SHA
115124
run: |
116125
CURRENT_SHA=$(git rev-parse HEAD)

0 commit comments

Comments
 (0)