generated from prom-client-net/prom-client-tmpl
-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.18 KB
/
ci.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CI
on:
push:
branches:
- "main"
tags:
- "v*"
jobs:
build:
name: CI Build
uses: ./.github/workflows/build.yml
secrets: inherit
github:
name: Deploy to GitHub
needs: [build]
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: nupkgs
- name: Push to pkg.github.com
run: dotnet nuget push "nupkgs/*.nupkg" -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GH_FULL_PAT }} --skip-duplicate
nuget:
name: Deploy to NuGet
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: nupkgs
- name: Create GitHub Release
run: gh release create ${{ github.ref_name }} nupkgs/*nupkg
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to nuget.org
run: dotnet nuget push "nupkgs/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}