-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.08 KB
/
release.yaml
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: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
- name: Publish Demo
run: dotnet publish src/NPokerEngine.Demo/NPokerEngine.Demo.csproj -c Release --output release --nologo
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: Uploading files to gh-pages branch
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: release/wwwroot
- name: Pack nugets
run: dotnet pack src/NPokerEngine/NPokerEngine.csproj -c Release --no-build -p:PackageVersion=${{github.event.release.name}} --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json