Skip to content

Commit 69a9a95

Browse files
committed
2 parents dcc7b51 + a39bb2b commit 69a9a95

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

.github/workflows/nuget.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
name: CD-NuGet
1+
name: Release
2+
3+
24

35
on:
46
push:
7+
# Sequence of patterns matched against refs/tags
58
tags:
9+
- 'v*.*.*'
10+
- 'v*.*.*-rc*'
611
- '[0-9]+.[0-9]+.[0-9]+'
712
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
8-
13+
914
jobs:
1015
build:
1116
runs-on: ubuntu-latest
@@ -19,9 +24,43 @@ jobs:
1924
with:
2025
dotnet-version: 6.0.x
2126

27+
- name: Restore dependencies
28+
run: dotnet restore
29+
30+
- name: Build
31+
id: build-project
32+
run: dotnet build ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release --no-restore
33+
34+
2235
- name: Pack
36+
id: pack-prohject
2337
run: |
24-
dotnet pack --configuration Release
25-
- name: Deploy
26-
run: |
27-
dotnet nuget push source/FikaAmazonAPI/bin/Release/*.nupkg -s nuget.org -k ${{ secrets.NUGET_TOKEN }}
38+
dotnet pack ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release
39+
40+
- name: PushNuget
41+
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate
42+
43+
44+
- name: Add github package source
45+
run: nuget sources Add -Name "github" -Source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json -UserName ${{github.repository_owner}} -Password ${{ secrets.USERGIHUB_TOKEN }}
46+
47+
48+
- name: Push to GitHub Packages
49+
run: dotnet nuget push "**/*.nupkg" --skip-duplicate --source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json --api-key ${GITHUB_TOKEN}
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.USERGIHUB_TOKEN }}
52+
53+
- name: Create Release
54+
id: create_release
55+
uses: actions/create-release@latest
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.USERGIHUB_TOKEN }}
58+
with:
59+
tag_name: ${{ github.ref }}
60+
release_name: Release ${{ github.ref }}
61+
body: TODO
62+
draft: false
63+
prerelease: false
64+
65+
66+

0 commit comments

Comments
 (0)