-
Notifications
You must be signed in to change notification settings - Fork 192
71 lines (49 loc) · 1.87 KB
/
nuget.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Release
on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*-rc*'
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install .NET
uses: actions/[email protected]
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
id: build-project
run: dotnet build ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release --no-restore
- name: Pack
id: pack-prohject
run: |
dotnet pack ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release
- name: PushNuget
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate
- name: Add github package source
run: nuget sources Add -Name "github" -Source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json -UserName ${{github.repository_owner}} -Password ${{ secrets.TOKEN_GITHUB_AMAZON_SP_API }}
- name: Push to GitHub Packages
run: dotnet nuget push "**/*.nupkg" --skip-duplicate --source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB_AMAZON_SP_API }}
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB_AMAZON_SP_API }}
with:
tag_name: ${{steps.tag.outputs.tag}}
release_name: Release ${{steps.tag.outputs.tag}}
body: TODO
draft: false
prerelease: false