Skip to content

Commit 5dd4337

Browse files
committed
Adds 'Pack' job to workflow
1 parent 38a617b commit 5dd4337

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,39 @@ on: [push]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
9-
108
steps:
11-
- uses: actions/checkout@v1
9+
- name: Dump GitHub context
10+
env:
11+
GITHUB_CONTEXT: ${{ toJson(github) }}
12+
run: echo "$GITHUB_CONTEXT"
13+
- name: Checkout
14+
uses: actions/checkout@v1
1215
- name: Setup .NET Core
1316
uses: actions/setup-dotnet@v1
1417
with:
15-
dotnet-version: 3.1.100
18+
dotnet-version: 3.1.101
1619
- name: Build with dotnet
1720
run: dotnet build --configuration Release
1821
- name: Test with dotnet
1922
run: dotnet test --configuration Release --no-build
23+
24+
pack:
25+
runs-on: ubuntu-latest
26+
needs: build
27+
if: github.event_name == 'push'
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v1
31+
- name: Setup .NET Core
32+
uses: actions/setup-dotnet@v1
33+
with:
34+
dotnet-version: 3.1.101
35+
- name: Determine version
36+
run: echo "::set-env name=VERSION::$(git describe --tags --dirty)"
37+
- name: Pack
38+
run: dotnet pack --output ./artifacts --configuration Release -p:Version=$VERSION
39+
- uses: actions/upload-artifact@v1
40+
with:
41+
name: artifacts
42+
path: ./artifacts

0 commit comments

Comments
 (0)