-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.92 KB
/
installer-build.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
name: Build installer
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
workflow_dispatch:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
permissions:
contents: read
packages: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_URL: "https://nuget.pkg.github.com/dend/index.json"
jobs:
build:
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
source-url: ${{ env.NUGET_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Verify commit exists in origin/master
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build
working-directory: ./src/OpenSpartan.Workshop
run: dotnet build --configuration Release
- name: Test
working-directory: ./src/OpenSpartan.Workshop
run: dotnet test --configuration Release --no-build
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Install WiX
run: dotnet tool install --global wix
- name: Build installer file
working-directory: ./src/OpenSpartan.Workshop.Installer.Bundle
run: msbuild -restore -p:Configuration=Release
- name: Release
uses: softprops/action-gh-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./src/OpenSpartan.Workshop.Installer.Bundle/bin/Release/OpenSpartan.Workshop.Installer.Bundle.exe
body_path: ./CURRENTRELEASE.md
token: ${{ secrets.RELEASE_TOKEN }}