1
1
# This workflow is a demo of how to use the Gihub Actions workflow steps for SignPath. For a complete documentation,
2
2
# view https://github.com/SignPath/github-actions
3
3
4
- name : sign-with-signpath
4
+ name : build-and-sign
5
5
run-name : Demo workflow signing with SignPath
6
6
on :
7
7
push :
11
11
workflow_dispatch : # Allows you to run this workflow manually from the Actions tab
12
12
13
13
jobs :
14
- build-and-sign :
14
+ build_and_sign :
15
15
runs-on : windows-latest
16
16
steps :
17
17
18
18
- name : checkout
19
19
uses : actions/checkout@v3
20
+ with :
21
+ fetch-depth : 0
20
22
21
23
- name : build
22
- run : " echo \" This is a dummy build step that creates build-output/hello-world.exe\" "
24
+ run : ./src/Build.ps1
25
+
26
+ - name : create SBOM
27
+ run : ./sbom/Create-SBOM.ps1
28
+
29
+ - name : package artifacts
30
+ run : Compress-Archive -Path .\_BuildResult-unsigned\DemoExample.msi,.\_BuildResult-unsigned\bom.xml -DestinationPath .\_BuildResult-unsigned.zip -Force
23
31
24
32
- name : upload-unsigned-artifact
25
33
uses : actions/upload-artifact@v3
26
34
with :
27
- name : " hello-world "
28
- path : " ./build-output/hello-world.exe "
35
+ name : " demo-application-unsigned "
36
+ path : " ./_BuildResult-unsigned.zip "
29
37
if-no-files-found : error
30
38
31
39
- name : sign
@@ -34,15 +42,18 @@ jobs:
34
42
github-token : ' ${{ secrets.GITHUB_TOKEN }}'
35
43
api-token : ' ${{ secrets.SIGNPATH_API_TOKEN }}'
36
44
organization-id : ' ${{ vars.SIGNPATH_ORGANIZATION_ID }}'
37
- project-slug : ' Executable'
38
- signing-policy-slug : ' test-signing'
39
- artifact-configuration-slug : ' initial'
40
- artifact-name : " hello-world"
41
- signed-artifact-destination-path : " build-output/hello-world-signed.exe"
45
+ project-slug : ' Demo_Application'
46
+ signing-policy-slug : ${{ github.ref == 'refs/heads/main' && 'release-signing' || 'test-signing' }}
47
+ artifact-configuration-slug : ' v1'
48
+ artifact-name : " demo-application-unsigned"
49
+ signed-artifact-destination-path : " _BuildResult-signed.zip"
50
+
51
+ - name : decompress signed artifact
52
+ run : Expand-Archive -Path .\_BuildResult-signed.zip -DestinationPath _BuildResult-signed
42
53
43
54
- name : upload-signed-artifact
44
55
uses : actions/upload-artifact@v3
45
56
with :
46
- name : " hello-world -signed"
47
- path : " ./build-output/hello-world- signed.exe "
57
+ name : " demo-application -signed"
58
+ path : " _BuildResult- signed"
48
59
if-no-files-found : error
0 commit comments