-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (39 loc) · 1.47 KB
/
Deploy.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
name: "Build and publish"
on:
push:
tags:
- 'v*'
env:
INSTALLER_PATH: 'Totoro.Installer/Totoro.Installer.wixproj'
jobs:
deploy:
name: 'Build and deploy'
runs-on: 'windows-latest'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Install dotnet'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0'
- name: 'Add msbuild to PATH'
uses: microsoft/[email protected]
- name: 'Get version'
id: version
uses: battila7/get-version-action@v2
- name: 'Build MSI'
run: msbuild ${{ env.INSTALLER_PATH }} /property:Configuration=Release /property:BuildVersion=${{ steps.version.outputs.version-without-v }}
- name: 'Create release'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version-without-v }}
release_name: ${{ steps.version.outputs.version-without-v }}
- name: 'Add MSI to release'
uses: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pattern: Totoro.Installer/bin/Release/en-us/Totoro-Release.msi
release-url: ${{ steps.create_release.outputs.upload_url }}