Skip to content

Commit 25a6520

Browse files
feat: OC.OfficeLite.dll and OC.OfficeLiteServer.exe are now codesigned
1 parent 687b4c4 commit 25a6520

1 file changed

Lines changed: 39 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-latest
9+
runs-on: windows-latest
1010

1111
steps:
1212
- name: Checkout
@@ -34,11 +34,17 @@ jobs:
3434

3535
- name: Get current version
3636
if: steps.versionize.outcome == 'success'
37-
run: echo "VERSION=v$(versionize inspect)" >> $GITHUB_ENV
37+
run: |
38+
$version = versionize inspect
39+
echo "VERSION=v$version" >> $env:GITHUB_ENV
40+
shell: pwsh
3841

3942
- name: Get current changelog
4043
if: steps.versionize.outcome == 'success'
41-
run: echo "$(versionize changelog)" > latest_changelog.md
44+
run: |
45+
$changelog = versionize changelog
46+
Set-Content -Path latest_changelog.md -Value $changelog
47+
shell: pwsh
4248

4349
- name: Push changes to GitHub
4450
if: steps.versionize.outcome == 'success'
@@ -53,20 +59,40 @@ jobs:
5359
run: |
5460
dotnet build OC.OfficeLite --configuration release --output ./Publish
5561
dotnet build OC.OfficeLiteServer --configuration release --output ./Publish
62+
63+
- name: Install AzureSignTool
64+
run: dotnet tool install --global azuresigntool
65+
66+
- name: Sign executable
67+
if: steps.versionize.outcome == 'success'
68+
run: |
69+
azuresigntool sign `
70+
-kvu ${{secrets.AZURE_KEY_VAULT}} `
71+
-kvc ${{secrets.AZURE_CERT_NAME}} `
72+
-kvt ${{secrets.AZURE_TENANT_ID}} `
73+
-kvi ${{secrets.AZURE_CLIENT_ID}} `
74+
-kvs ${{secrets.AZURE_CLIENT_SECRET}} `
75+
-tr http://timestamp.globalsign.com/tsa/advanced `
76+
-td sha256 `
77+
./Publish/OC.OfficeLite.dll `
78+
./Publish/OC.OfficeLiteServer.exe
79+
80+
- name: Zip signed artifacts
81+
if: steps.versionize.outcome == 'success'
82+
run: |
83+
mkdir OC.OfficeLite
84+
mv OC.OfficeLite.dll OC.OfficeLite/
85+
mv Config.plugin OC.OfficeLite/
86+
Compress-Archive -Path OC.OfficeLite -DestinationPath OC.OfficeLite_${{env.VERSION}}.zip
87+
Compress-Archive -Path OC.OfficeLiteServer.exe -DestinationPath OC.OfficeLiteServer_${{env.VERSION}}.zip
88+
shell: pwsh
89+
working-directory: Publish
5690

5791
- name: Publish new release
5892
if: steps.versionize.outcome == 'success'
5993
env:
6094
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6195
run: |
6296
gh release create ${{env.VERSION}} -t "Release ${{env.VERSION}}" -F latest_changelog.md
63-
cd ./Publish
64-
mkdir OC.OfficeLite
65-
mv OC.OfficeLite.dll OC.OfficeLite/
66-
mv Config.plugin OC.OfficeLite/
67-
zip -r OC.OfficeLite_${{env.VERSION}}.zip OC.OfficeLite
68-
gh release upload ${{env.VERSION}} OC.OfficeLite_${{env.VERSION}}.zip
69-
mkdir OC.OfficeLiteServer
70-
mv OC.OfficeLiteServer.exe OC.OfficeLiteServer/
71-
zip -r OC.OfficeLiteServer_${{env.VERSION}}.zip OC.OfficeLiteServer
72-
gh release upload ${{env.VERSION}} OC.OfficeLiteServer_${{env.VERSION}}.zip
97+
gh release upload ${{env.VERSION}} ./Publish/OC.OfficeLite_${{env.VERSION}}.zip
98+
gh release upload ${{env.VERSION}} ./Publish/OC.OfficeLiteServer_${{env.VERSION}}.zip

0 commit comments

Comments
 (0)