Skip to content

Improve patterns.xml #139

Improve patterns.xml

Improve patterns.xml #139

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