forked from dexyfex/CodeWalker
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.79 KB
/
dotnet-desktop.yml
File metadata and controls
59 lines (52 loc) · 1.79 KB
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
name: .NET Publish
on:
push:
tags:
- '*'
env:
PROJECT_ROOT: ./
DOTNET_VERSION: '6.0.x'
jobs:
publish:
name: Publish for ${{ matrix.target }} for ${{ matrix.buildConfig }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
target: [windows-latest]
buildConfig: [Release]
include:
- buildConfig: Release
buildSuffix: _Release
- target: windows-latest
os: windows-latest
artifact_name: winBuild.exe
asset_name: windows-x64
runtime: win-x64
- target: ubuntu-latest
os: ubuntu-latest
artifact_name: ubuntuBuild
asset_name: linux-x64
runtime: linux-x64
steps:
# Checkout the repo
- uses: actions/checkout@v2
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: dotnet publish
run: dotnet publish --self-contained true --runtime ${{ matrix.runtime}} -c Release -o target/release/${{ matrix.artifact_name }}${{ matrix.buildSuffix }} ./CodeWalker.Console/CodeWalker.Console.csproj
- name: Zip build
uses: thedoctor0/zip-release@main
with:
path: target/release/${{ matrix.artifact_name }}${{ matrix.buildSuffix }}
type: zip
filename: target/release/${{ matrix.artifact_name }}${{ matrix.buildSuffix }}.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}${{ matrix.buildSuffix }}.zip
asset_name: ${{ matrix.asset_name }}${{ matrix.buildSuffix }}.zip
tag: ${{ github.ref }}