-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (55 loc) · 1.66 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
run-name: Build and release to repository
on:
push:
branches:
- master
workflow_dispatch:
inputs:
tag:
description: 'Version tag (latest if none provided)'
required: false
default: latest
type: string
jobs:
build:
name: Build WatchDog
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- name: Restore NuGet dependencies
shell: powershell
run: 'C:\Program` Files\Microsoft` Visual` Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe -t:restore'
- name: Build binary
shell: powershell
run: 'C:\Program` Files\Microsoft` Visual` Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe AMRPC` WatchDog` Desktop.sln /p:Configuration=Release'
- name: Compress binary
shell: powershell
run: ' Compress-Archive .\AMRPC` WatchDog` Desktop\bin\Release\* watchdog.zip'
- uses: actions/upload-artifact@v2
with:
name: watchdog-build
path: watchdog.zip
create_release:
name: Create repository release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- uses: actions/download-artifact@v2
with:
name: watchdog-build
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: 'watchdog.zip'
tag: ${{ inputs.tag }}
replacesArtifacts: true
allowUpdates: true\\
bodyFile: "install_instructions.md"