-
-
Notifications
You must be signed in to change notification settings - Fork 12
128 lines (108 loc) · 4.63 KB
/
Copy pathdotnet-release.yml
File metadata and controls
128 lines (108 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# When a release is published on github.com, this workflow creates a release build and uploads it to the release page
name: Release
on:
release:
types: [ published ]
jobs:
portable:
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
- uses: ./.github/build
id: build
with:
configuration: Release
flavor: Portable
artifact: release_artifact_portable
- name: Create zip
run: Compress-Archive -Path ${{steps.build.outputs.path}}/* -Destination release_artifact_portable_unsigned.zip
- name: Upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: release_artifact_portable_unsigned.zip
asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_portable_unsigned.zip
asset_content_type: application/zip
- name: Sign with Signpath
uses: signpath/github-action-submit-signing-request@v1.1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '030bee06-17be-4a2a-a788-9efdbd14a889'
project-slug: 'PasteIntoFile'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'portable'
github-artifact-id: '${{ steps.build.outputs.artifact-id }}'
parameters: |
version: "${{ steps.build.outputs.version }}"
wait-for-completion: true
output-artifact-directory: 'signing_result'
- name: Create zip
run: Compress-Archive -Path signing_result/* -Destination release_artifact_portable_signed.zip
- name: Upload signed release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: release_artifact_portable_signed.zip
asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_portable_signed.zip
asset_content_type: application/zip
installer:
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build program executable
id: build
uses: ./.github/build
with:
configuration: Release
flavor: Installer
- name: Add WiX toolkit to PATH
shell: bash
run: echo "${WIX}bin" >> $GITHUB_PATH
- name: Build MSI file with WiX toolchain
run: |
cd Installer
heat dir ../${{steps.build.outputs.path}} -dr INSTALLFOLDER -ag -cg ReleaseFragment -ke -srd -sfrag -nologo -pog:Binaries -pog:Documents -pog: Satellites -pog:Sources -pog:Content -t releaseFiles.xslt -out releaseFiles.wxs
candle releaseFiles.wxs
candle PasteIntoFile.wxs
light -b ../${{steps.build.outputs.path}} releaseFiles.wixobj PasteIntoFile.wixobj -ext WixNetFxExtension -out Installer.msi
- name: Upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: Installer/Installer.msi
asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_installer_unsigned.msi
asset_content_type: application/msi
- name: Upload artifact for signing
id: upload
uses: actions/upload-artifact@v4
with:
path: Installer/Installer.msi
- name: Sign with Signpath
uses: signpath/github-action-submit-signing-request@v1.1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '030bee06-17be-4a2a-a788-9efdbd14a889'
project-slug: 'PasteIntoFile'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'installer-zip'
github-artifact-id: '${{ steps.upload.outputs.artifact-id }}'
parameters: |
version: "${{ steps.build.outputs.version }}"
wait-for-completion: true
output-artifact-directory: 'signing_result'
- name: Upload signed release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: signing_result/Installer.msi
asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_installer_signed.msi
asset_content_type: application/msi