Skip to content

Commit

Permalink
actions added for vapid
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsnl committed Aug 20, 2023
1 parent 3602246 commit 7607fb6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/AdsPush-VAPID.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Nuget-AdsPush.VAPID"

on:
push:
tags:
- 'v*'

env:
PROJECT_PATH: 'src/AdsPush.Vapid/AdsPush.Vapid.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
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: 'Get Version'
id: version
uses: battila7/get-version-action@v2

- name: 'Pack project'
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 }}

- name: 'Push package'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate

0 comments on commit 7607fb6

Please sign in to comment.