forked from davidmchapman/3DContainerPacking
-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 1.32 KB
/
Copy pathrelease.yml
File metadata and controls
37 lines (33 loc) · 1.32 KB
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
name: build, test, pack and push
on:
push:
tags:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Package nuget
run: dotnet pack ./src/CromulentBisgetti.ContainerPacking/CromulentBisgetti.ContainerPacking.csproj --configuration release -o:package /p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
- name: Push generated package to GitHub registry
run: dotnet nuget push ./package/*.nupkg --source "https://nuget.pkg.github.com/DigitecGalaxus/index.json" --api-key ${{ github.token }}
- name: Push generated package to nuget registry
run: dotnet nuget push ./package/*.nupkg --source "https://api.nuget.org/v3/index.json" -k ${{ secrets.NUGET_API_KEY }}