forked from wkallhof/Simple301
-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (34 loc) · 1.43 KB
/
build.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: Build and Package
env:
OUTPUT: ./Output
CONFIG: Release
on:
push:
tags:
- "release/*"
jobs:
build:
runs-on: windows-latest
steps:
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
shell: bash
- uses: actions/checkout@v2
- name: Setup .net core
uses: actions/[email protected]
- name: Restore dependencies
run: dotnet restore ./source/SimpleRedirects.sln
- name: Build
run: dotnet build ./source/SimpleRedirects.sln --configuration ${{ env.CONFIG }} --no-restore
- name: Create NuGet package file for Core
run: dotnet pack ./source/SimpleRedirects.Core/SimpleRedirects.Core.csproj -c ${{ env.CONFIG }} --no-build -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
- name: Create NuGet package file for Backoffice
run: dotnet pack ./source/SimpleRedirects/SimpleRedirects.csproj -c ${{ env.CONFIG }} --no-build -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
# - name: Push packages to NuGet
# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_DEPLOY_KEY }} -s https://api.nuget.org/v3/index.json
- name: upload-artifacts
uses: actions/upload-artifact@v2
with:
name: Build-Results-${{ steps.get_version.outputs.VERSION }}
path: ${{ env.OUTPUT }}/**/*