-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (60 loc) · 2.22 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build & Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version number to release'
required: true
jobs:
build:
runs-on: ${{matrix.os.name}}
strategy:
matrix:
os:
- { name: ubuntu-latest, runtime: linux-x64 }
- { name: windows-latest, runtime: win-x64 }
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install .NET 6.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Publish
run: dotnet publish hues.Desktop/ --configuration Release --runtime ${{matrix.os.runtime}} -p:Version=${{github.event.inputs.version}} --output hues.${{github.event.inputs.version}}.${{matrix.os.runtime}}
# Have to tar the build output to preserve file permissions because artifact upload removes them :(
- name: Tar Build Output
shell: bash
run: tar cvf ${{matrix.os.runtime}}-build.tar hues.${{github.event.inputs.version}}.${{matrix.os.runtime}}/
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{matrix.os.runtime}}-build
path: ${{matrix.os.runtime}}-build.tar
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Fetch Linux Build
uses: actions/download-artifact@v2
with:
name: linux-x64-build
- name: Untar Linux Build
run: tar xvf linux-x64-build.tar
- name: Compress Linux Build
run: zip -r hues.${{github.event.inputs.version}}.linux-x64.zip hues.${{github.event.inputs.version}}.linux-x64/
- name: Fetch Windows Build
uses: actions/download-artifact@v2
with:
name: win-x64-build
- name: Untar Windows Build
run: tar xvf win-x64-build.tar
- name: Compress Windows Build
run: zip -r hues.${{github.event.inputs.version}}.win-x64.zip hues.${{github.event.inputs.version}}.win-x64/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: '*.zip'
tag_name: ${{github.event.inputs.version}}
fail_on_unmatched_files: true
body: This is a new release, patch notes haven't been added yet!