forked from icsharpcode/SharpZipLib
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.37 KB
/
on-push.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
name: Build master on push
env:
PUBLISH_DEV_PACKS: disabled
on:
push:
branches: [ master ]
release:
jobs:
BuildAndTest:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
configuration: [debug, release]
os: [ubuntu, windows, macos]
libtarget: [netstandard2.0, netstandard2.1]
testtarget: [netcoreapp3.1]
include:
- configuration: debug
os: windows
libtarget: net45
testtarget: net45
- configuration: release
os: windows
libtarget: net45
testtarget: net45
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Build library
run: dotnet build -c ${{ matrix.configuration }} -f ${{ matrix.libtarget }} src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
- name: Restore test dependencies
run: dotnet restore
- name: Run tests
run: dotnet test -c ${{ matrix.configuration }} -f ${{ matrix.testtarget }} --no-restore
Codacy-Analysis:
runs-on: ubuntu-latest
name: Codacy Analysis CLI
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run codacy-analysis-cli
uses: codacy/codacy-analysis-cli-action@1.1.0
with:
# The current issues needs to be fixed before this can be removed
max-allowed-issues: 9999
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
upload: true
Package:
needs: [BuildAndTest]
runs-on: windows-latest
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
source-url: https://nuget.pkg.github.com/icsharpcode/index.json
- name: Build and pack
run: dotnet build -c Release -o dist /p:ContinuousIntegrationBuild=true /p:EmbedUntrackedSources=true /p:Version=$(git describe --abbrev | % { $_.substring(1) }) src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
- name: Upload nuget package artifact
uses: actions/upload-artifact@v2
with:
name: Nuget package
path: dist/*.nupkg