mirror of
https://github.com/ditkrg/asp.netcore-authentication.git
synced 2026-01-22 21:07:04 +00:00
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
---
|
|
name: Deploy To Nuget
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+[0-9a-z]+"
|
|
|
|
paths-ignore:
|
|
- "**.md"
|
|
- ".vscode/**"
|
|
|
|
concurrency:
|
|
group: deploy-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
uses: ./.github/workflows/tests-base.yaml
|
|
|
|
build-push:
|
|
name: Build and Publish
|
|
needs: [test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: "7.0.x"
|
|
|
|
- name: Restore packages
|
|
run: dotnet restore
|
|
|
|
- name: Create Pack
|
|
run: dotnet pack --no-restore --property:PackageOutputPath=${{ runner.temp }}/packages --property:PackageVersion=${{ github.ref_name }}
|
|
|
|
- name: Publish to Nuget
|
|
run: |-
|
|
dotnet nuget push "${{ runner.temp }}/packages/*.nupkg" \
|
|
--skip-duplicate \
|
|
--api-key ${{ secrets.NUGET_API_KEY }} \
|
|
--source https://api.nuget.org/v3/index.json
|