Skip to content

Commit c8b3b9d

Browse files
committed
ci: unify PR/push CI build actions
1 parent 1b9fcfc commit c8b3b9d

File tree

2 files changed

+14
-111
lines changed

2 files changed

+14
-111
lines changed
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: Build and Test PR
1+
name: Build and Test
22

33
on:
44
pull_request:
55
branches: [ master ]
6+
push:
7+
branches: [ master ]
8+
release:
69

710
jobs:
811
Build:
@@ -64,14 +67,12 @@ jobs:
6467

6568
- name: Upload coverage to Codecov
6669
uses: codecov/codecov-action@v1.2.2
67-
with:
68-
fail_ci_if_error: false
6970

7071
Pack:
7172
needs: [Build, Test]
7273
runs-on: windows-latest
7374
env:
74-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
75+
PKG_SUFFIX: ''
7576

7677
steps:
7778
- uses: actions/checkout@v2
@@ -84,15 +85,19 @@ jobs:
8485
dotnet-version: '3.1.x'
8586

8687
- name: Build library for .NET Standard 2.0
87-
run: dotnet build -c Release -f netstandard2.0 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
88+
run: dotnet build -c Release -f netstandard2.0 /p:ContinuousIntegrationBuild=true src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
8889
- name: Build library for .NET Standard 2.1
89-
run: dotnet build -c Release -f netstandard2.1 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
90+
run: dotnet build -c Release -f netstandard2.1 /p:ContinuousIntegrationBuild=true src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
9091
- name: Build library for .NET Framework 4.5
91-
run: dotnet build -c Release -f net45 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
92+
run: dotnet build -c Release -f net45 /p:ContinuousIntegrationBuild=true src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
93+
94+
- name: Add PR suffix to package
95+
if: ${{ github.event_name == 'pull_request' }}
96+
run: echo "PKG_SUFFIX=-PR" >> $GITHUB_ENV
9297

9398
- name: Create nuget package
94-
run: dotnet pack src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj --configuration Release --output dist /p:Version=$(git describe --abbrev | % { $_.substring(1) })-PR
95-
99+
run: dotnet pack src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj --configuration Release --output dist /p:ContinuousIntegrationBuild=true /p:EmbedUntrackedSources=true /p:Version=$(git describe --abbrev | % { $_.substring(1) })${{ env.PKG_SUFFIX }}
100+
96101
- name: Upload nuget package artifact
97102
uses: actions/upload-artifact@v2
98103
with:

.github/workflows/on-push.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)