-
Notifications
You must be signed in to change notification settings - Fork 125
97 lines (79 loc) · 3.88 KB
/
publish.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Publish
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: bash
strategy:
matrix:
release:
- type: Release
suffix: ''
name: Build (${{ matrix.release.type }})
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Restore Dependencies
run: dotnet restore $PWD/TeamFiltration/
- name: Build for Windows
continue-on-error: true
run: |
VERSION=${{ github.ref_name }}
dotnet publish $PWD/TeamFiltration/ -c ${{ matrix.release.type }} -r win-x64 -p:PublishSingleFile=true --self-contained true --output $PWD/TeamFiltrationRelease/Windows/ -p:Version=${VERSION:1}
- name: Build for Linux
continue-on-error: true
run: |
VERSION=${{ github.ref_name }}
dotnet publish $PWD/TeamFiltration/ -c ${{ matrix.release.type }} -r linux-x64 -p:PublishSingleFile=true --self-contained true --output $PWD/TeamFiltrationRelease/Linux/ -p:Version=${VERSION:1}
- name: Build for Linux ARM
continue-on-error: true
run: |
VERSION=${{ github.ref_name }}
dotnet publish $PWD/TeamFiltration/ -c ${{ matrix.release.type }} -r linux-arm64 -p:PublishSingleFile=true --self-contained true --output $PWD/TeamFiltrationRelease/LinuxArm/ -p:Version=${VERSION:1}
- name: Build for Mac Intel
continue-on-error: true
run: |
VERSION=${{ github.ref_name }}
dotnet publish $PWD/TeamFiltration/ -c ${{ matrix.release.type }} -r osx-x64 -p:PublishSingleFile=true --self-contained true --output $PWD/TeamFiltrationRelease/Mac/ -p:Version=${VERSION:1}
- name: Build for Mac ARM
continue-on-error: true
run: |
VERSION=${{ github.ref_name }}
dotnet publish $PWD/TeamFiltration/ -c ${{ matrix.release.type }} -r osx-arm64 -p:PublishSingleFile=true --self-contained true --output $PWD/TeamFiltrationRelease/MacArm/ -p:Version=${VERSION:1}
- name: Zip Windows
continue-on-error: true
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 TeamFiltration-${{ github.ref_name }}-win-x86_64.zip $PWD/TeamFiltrationRelease/Windows/TeamFiltration.exe $PWD/*.json
- name: Zip Linux
continue-on-error: true
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 TeamFiltration-${{ github.ref_name }}-linux-x86_64$.zip $PWD/TeamFiltrationRelease/Linux/TeamFiltration $PWD/*.json
- name: Zip Linux ARM
continue-on-error: true
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 TeamFiltration-${{ github.ref_name }}-linux-arm64$.zip $PWD/TeamFiltrationRelease/LinuxArm/TeamFiltration $PWD/*.json
- name: Zip Mac
continue-on-error: true
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 TeamFiltration-${{ github.ref_name }}-macOS-x86_64.zip $PWD/TeamFiltrationRelease/Mac/TeamFiltration $PWD/*.json
- name: Zip Mac ARM
continue-on-error: true
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 TeamFiltration-${{ github.ref_name }}-macOS-arm64.zip $PWD/TeamFiltrationRelease/MacArm/TeamFiltration $PWD/*.json
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
TeamFiltration-${{ github.ref_name }}-win-x86_64.zip
TeamFiltration-${{ github.ref_name }}-linux-x86_64$.zip
TeamFiltration-${{ github.ref_name }}-linux-arm64$.zip
TeamFiltration-${{ github.ref_name }}-macOS-x86_64.zip
TeamFiltration-${{ github.ref_name }}-macOS-arm64.zip