-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.39 KB
/
staging.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
name: Automatic Staging
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
pack:
name: Build and Test Package
runs-on: ubuntu-latest
steps:
- name: Checkout from GitHub
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore Solution
run: dotnet restore
- name: Run Unit Tests
run: dotnet test -c Release --logger "console;verbosity=detailed" Starnet.Tests
- name: Get Commit Information
id: commit
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build NuGet Package
run: dotnet pack -c Debug /p:Version=0 Starnet
- name: Prepare Package Artifact
run: |
mv \
${{ github.workspace }}/Starnet/bin/Debug/LBPUnion.Starnet.0.0.0.nupkg \
${{ github.workspace }}/Starnet/bin/Debug/LBPUnion.Starnet.debug.${{ steps.commit.outputs.hash }}.nupkg
- name: Upload Package Artifact
uses: actions/[email protected]
with:
name: LBPUnion.Starnet.debug.${{ steps.commit.outputs.hash }}.nupkg
path: ${{ github.workspace }}/Starnet/bin/Debug/LBPUnion.Starnet.debug.${{ steps.commit.outputs.hash }}.nupkg
if-no-files-found: error
retention-days: 3