Skip to content

Commit b036cf7

Browse files
authored
Update release.yml
1 parent 03d8a3d commit b036cf7

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Release
33
on:
44
release:
55
types: [ published ]
6-
workflow_dispatch:
6+
workflow_dispatch:
77

88
permissions:
99
contents: write
1010
id-token: write
1111
attestations: write
12-
12+
1313
jobs:
1414
release:
1515
runs-on: windows-2022
@@ -24,25 +24,34 @@ jobs:
2424
- name: Publish
2525
run: |
2626
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
27-
powershell Compress-Archive app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper-unsigned.zip
27+
powershell Compress-Archive app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
28+
29+
- name: Upload unsigned artifact
30+
id: upload-unsigned-artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
path: GHelper.zip
2834

29-
- name: Sign artifact with SignPath
35+
- id: sign
3036
uses: signpath/github-action-submit-signing-request@v1.1
3137
with:
32-
project: ${{ secrets.SIGNPATH_PROJECT }}
33-
policy: ${{ secrets.SIGNPATH_POLICY }}
34-
input: GHelper-unsigned.zip
35-
output: GHelper.zip
38+
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
39+
organization-id: ${{ secrets.SIGNPATH_ORG_ID }}
40+
project-slug: ${{ secrets.SIGNPATH_PROJECT }}
41+
signing-policy-slug: ${{ secrets.SIGNPATH_POLICY }}
42+
github-artifact-id: ${{ steps.upload-unsigned-artifact.outputs.artifact-id }}
43+
wait-for-completion: true
44+
output-artifact-directory: './signed'
3645

37-
- name: Upload
46+
- name: Upload signed artifact
3847
env:
3948
GH_TOKEN: ${{ github.token }}
4049
run: |
41-
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
50+
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe ./signed/GHelper.zip
4251
4352
- name: Generate SLSA build provenance attestation
4453
uses: actions/attest-build-provenance@v2
4554
with:
4655
subject-path: |
4756
app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe
48-
GHelper.zip
57+
./signed/GHelper.zip

0 commit comments

Comments
 (0)