-
-
Notifications
You must be signed in to change notification settings - Fork 46
36 lines (26 loc) · 896 Bytes
/
release.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
name: release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore SampSharp.sln
- name: Test
run: dotnet test SampSharp.sln /p:CiVersion=${VERSION} --no-restore
- name: Build
run: dotnet build SampSharp.sln /p:CiVersion=${VERSION} --configuration Release --no-restore
- name: Pack
run: dotnet pack SampSharp.sln --configuration Release --no-build --output bin
- name: Push
run: dotnet nuget push bin/*.nupkg --source="https://api.nuget.org/v3/index.json" --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate