-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (24 loc) · 948 Bytes
/
cd.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
name: CD
on:
push:
release:
types: [published]
jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-20.04
if: github.repository == 'GmodNET/Templates'
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup dotnet SDK
uses: actions/[email protected]
- name: Build nupkgs
run: dotnet pack Template.csproj -c Release -o nupkgs
- name: Authorize DevOps
run: dotnet nuget update source gmodnet-packages --username CD --password ${{ secrets.AZURE_DEVOPS_ARTIFACTS_PAT }} --store-password-in-clear-text
- name: Push nupkgs to DevOps
run: dotnet nuget push nupkgs/**.nupkg --source gmodnet-packages --api-key az --skip-duplicate
- name: Push nupkgs to NuGet.org
if: github.event_name == 'release'
run: dotnet nuget push nupkgs/**.nupkg --source nuget --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate