-
Notifications
You must be signed in to change notification settings - Fork 33
88 lines (65 loc) · 2.96 KB
/
buildandrelease.yml
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
name: Build And Release
on: [push, pull_request]
jobs:
build:
runs-on: windows-2022
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true
- name: Write code sign file
id: write_file
if: ${{ github.event_name == 'push' && endsWith(github.ref, '/master') }} # Never write code sign file on pull requests
uses: Ceiridge/base64-to-file@master
with:
fileName: 'codesign.pfx'
encodedString: ${{ secrets.CODE_SIGN_PFX }}
- name: Copy code sign file
if: ${{ github.event_name == 'push' && endsWith(github.ref, '/master') }} # Never write code sign file on pull requests
shell: cmd
env:
PFXLOC: ${{ steps.write_file.outputs.filePath }}
run: |
copy /Y %PFXLOC% codesign.pfx
dir
- name: Add signtool to PATH
shell: powershell
run: |
echo "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup dotnet for use with actions
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Restore NuGet packages
shell: cmd
run: |
dotnet restore
- name: Build with MSBuild
run: |
msbuild ChromeDevExtWarningPatcher.sln -p:Configuration=Release
- uses: actions/upload-artifact@v2
with:
name: built-gui-binaries
path: ChromeDevExtWarningPatcher/bin/Release/
- uses: actions/upload-artifact@v2
with:
name: built-native-binaries
path: x64/
- name: Zip the builds
shell: powershell
run: |
cd ChromeDevExtWarningPatcher\bin\Release\net6.0-windows10.0.17763.0;
Compress-Archive -DestinationPath ChromeDevExtWarningPatcher.zip -Path amd64,arm64,runtimes,x86,ChromeDevExtWarningPatcher.deps.json,ChromeDevExtWarningPatcher.dll,ChromeDevExtWarningPatcher.exe,ChromeDevExtWarningPatcher.pdb,ChromeDevExtWarningPatcher.runtimeconfig.json,CommandLine.dll,Dia2Lib.dll,MaterialDesignColors.dll,MaterialDesignThemes.Wpf.dll,Microsoft.Win32.SystemEvents.dll,Microsoft.Win32.TaskScheduler.dll,Microsoft.Windows.SDK.NET.dll,OSExtensions.dll,System.Drawing.Common.dll,TraceReloggerLib.dll,WinRT.Runtime.dll,README.txt;
dir;
- uses: "Ceiridge/action-automatic-releases@master" # Actually made by marvinpinto
if: ${{ github.event_name == 'push' && endsWith(github.ref, '/master') }} # Don't release on pull requests
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Prerelease Build"
files: |
ChromeDevExtWarningPatcher/bin/Release/net6.0-windows10.0.17763.0/ChromeDevExtWarningPatcher.zip