Skip to content

Commit 7607fb6

Browse files
committed
actions added for vapid
1 parent 3602246 commit 7607fb6

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/AdsPush-VAPID.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Nuget-AdsPush.VAPID"
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
PROJECT_PATH: 'src/AdsPush.Vapid/AdsPush.Vapid.csproj'
10+
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
11+
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
12+
13+
jobs:
14+
deploy:
15+
name: 'Deploy'
16+
runs-on: 'windows-latest'
17+
steps:
18+
- name: 'Checkout'
19+
uses: actions/checkout@v2
20+
21+
- name: 'Install dotnet'
22+
uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: '6.0.x'
25+
26+
- name: 'Restore packages'
27+
run: dotnet restore ${{ env.PROJECT_PATH }}
28+
29+
- name: 'Build project'
30+
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
31+
32+
- name: 'Get Version'
33+
id: version
34+
uses: battila7/get-version-action@v2
35+
36+
- name: 'Pack project'
37+
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
38+
39+
- name: 'Push package'
40+
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate

0 commit comments

Comments
 (0)