-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 987 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
name: Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}/nuget-5.0.x/${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}/nuget-5.0.x/
- name: Install Dependencies
run: dotnet restore
- name: Build Package
run: dotnet build --configuration Release --no-restore Percy
- name: Create Package
run: dotnet pack --configuration Release Percy
- name: Publish Package
run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_TOKEN -s $NUGET_SOURCE
env:
NUGET_SOURCE: https://api.nuget.org/v3/index.json
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}