Skip to content

Commit 671dfb7

Browse files
committed
Fix commit SHA in artifact name for PR builds
1 parent 5978a8d commit 671dfb7

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
env:
10+
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
11+
912
jobs:
1013
test:
1114
strategy:
@@ -121,14 +124,10 @@ jobs:
121124
run: rm binary.tar
122125
working-directory: ./server/analysis_binaries
123126

124-
- name: Store short commit SHA for filename
125-
id: vars
126-
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
127-
128127
- name: Package Extension
129-
run: npx vsce package -o rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
128+
run: npx vsce package -o rescript-vscode-${{ env.commit_sha }}.vsix
130129

131130
- uses: actions/upload-artifact@v2
132131
with:
133-
name: rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
134-
path: rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
132+
name: rescript-vscode-${{ env.commit_sha }}.vsix
133+
path: rescript-vscode-${{ env.commit_sha }}.vsix

0 commit comments

Comments
 (0)