-
Notifications
You must be signed in to change notification settings - Fork 78
59 lines (53 loc) · 2.1 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
51
52
53
54
55
56
57
58
59
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: DotNet Build
# on: [ push, pull_request ]
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
inputs:
tags:
description: 'Test run'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./alternatives/dotnet
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Install dependencies
run: |
pwd
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Publish
run: |
dotnet publish discogs/discogs.csproj -o ./artifacts/discogs-linux -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish discogs/discogs.csproj -o ./artifacts/discogs-osx -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish discogs/discogs.csproj -o ./artifacts/discogs-win -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
- name: Upload build artifacts - linux
uses: actions/upload-artifact@v2
with:
name: discogsxml2db-linux-x64
path: /home/runner/work/discogs-xml2db/discogs-xml2db/alternatives/dotnet/artifacts/discogs-linux
- name: Upload build artifacts - macOS
uses: actions/upload-artifact@v2
with:
name: discogsxml2db-osx-x64
path: /home/runner/work/discogs-xml2db/discogs-xml2db/alternatives/dotnet/artifacts/discogs-osx
- name: Upload build artifacts - Win
uses: actions/upload-artifact@v2
with:
name: discogsxml2db-win-x64
path: /home/runner/work/discogs-xml2db/discogs-xml2db/alternatives/dotnet/artifacts/discogs-win