-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (32 loc) · 1.06 KB
/
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
37
38
39
40
41
42
name: release
on:
release:
types:
- published
env:
VERSION: 1.0.0
jobs:
build:
environment: Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore Packages
run: dotnet restore
- name: Build Solution
run: dotnet build -c Release --no-restore
- name: Run Tests
run: dotnet test -c Release --no-build --verbosity normal
- name: Set Version Variable
env:
TAG: ${{ github.ref_name }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Pack FeatBit.ServerSdk
run: dotnet pack ./src/FeatBit.ServerSdk/FeatBit.ServerSdk.csproj -c Release --no-restore --no-build --output ${VERSION} /p:PackageVersion=$VERSION
- name: Publish NuGet Package
run: dotnet nuget push ${VERSION}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate