-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (38 loc) · 1.43 KB
/
deploy.yml
File metadata and controls
47 lines (38 loc) · 1.43 KB
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: "Deploy to NuGet"
on:
push:
tags:
- 'v*'
branches: [ master ]
pull_request:
branches: [ master ]
env:
PROJECT_PATH: 'AspNetCore.Yandex.ObjectStorage/AspNetCore.Yandex.ObjectStorage.csproj'
TEST_PROJECT_PATH: './AspNetCore.Yandex.ObjectStorage.sln'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\bin\Release
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
deploy:
name: 'Deploy'
runs-on: 'windows-latest'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Install dotnet'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: 'Restore packages'
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: 'Build project'
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
- name: 'Test project'
run: dotnet test ${{ env.TEST_PROJECT_PATH }} --no-restore --verbosity normal
env:
BucketName: ${{ secrets.BUCKETNAME }}
AccessKey: ${{ secrets.ACCESSKEY }}
SecretKey: ${{ secrets.SECRET_KEY }}
- name: 'Pack project'
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Push package'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate