-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.35 KB
/
dotnet.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
name: .NET
on:
push:
tags:
- "*.*.*"
jobs:
build:
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
app: ['cli','desktop']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
- app: cli
projectPath: ./src/CandleMage.CLI/CandleMage.CLI.csproj
- app: desktop
projectPath: ./src/CandleMage.Desktop/CandleMage.Desktop.csproj
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Publish
run: dotnet publish ${{ matrix.projectPath }} --runtime "${{ matrix.target }}" -c Release -o "${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}"
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: ./${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}/
filename: '${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}.zip'
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
*.zip