-
Notifications
You must be signed in to change notification settings - Fork 53
59 lines (44 loc) · 1.64 KB
/
release.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
name: release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup nuget
uses: nuget/setup-nuget@v1
- run: |
Invoke-WebRequest -OutFile Update-AssemblyInfoVersionFiles.ps1 https://gist.githubusercontent.com/lowleveldesign/663de4e0d5a071f938e6f7c82d7ca9a0/raw/Update-AssemblyInfoVersionFiles.ps1
./Update-AssemblyInfoVersionFiles.ps1
shell: pwsh
- name: Restore packages
run: nuget restore wtrace.sln
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Build Release using MSBuild
run: msbuild wtrace.sln -m /p:Configuration=Release
- uses: actions/upload-artifact@v4
with:
name: wtrace
path: bin\wtrace\net48\wtrace.exe
- name: Copy the binary to Chocolatey path
run: Copy-Item bin\wtrace\net48\wtrace.exe choco\tools
- run: |
Invoke-WebRequest -OutFile Print-FileHashes.ps1 https://gist.githubusercontent.com/lowleveldesign/f1afd42662ee8dabe07cf8cbfe25e6a1/raw/Print-FileHashes.ps1
./Print-FileHashes.ps1 -FilePath choco\tools\wtrace.exe >> choco\tools\VERIFICATION.txt
shell: pwsh
- name: Build Chocolatey package
run: choco pack
working-directory: choco
- uses: actions/upload-artifact@v4
with:
name: wtrace-pkg
path: choco\wtrace.*.nupkg
- name: Release Chocolatey package
run: choco push $(Resolve-Path "wtrace.*.nupkg") -s https://push.chocolatey.org/ -k "$env:CHOCO_KEY"
env:
CHOCO_KEY: ${{ secrets.CHOCO_KEY }}
working-directory: choco