Skip to content

Commit bdc3ca8

Browse files
committed
add release CI
1 parent 91a60c5 commit bdc3ca8

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: .NET NuGet package release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: 8.0.x
20+
21+
- name: Add local NuGet feed
22+
run: |
23+
mkdir -p ~/localfeed
24+
dotnet nuget add source ~/localfeed --name LocalFeed
25+
26+
- name: Build DeviceProgramming
27+
uses: ./.github/template/build-package
28+
with:
29+
project: DeviceProgramming
30+
31+
- name: Build LibUsbDfu
32+
uses: ./.github/template/build-package
33+
with:
34+
project: LibUsbDfu
35+
36+
- name: Push packages to NuGet.org
37+
run: dotnet nuget push ~/localfeed/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
38+
39+
- name: Push packages to GitHub Packages
40+
run: |
41+
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/IntergatedCircuits/index.json"
42+
dotnet nuget push ~/localfeed/*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
43+

0 commit comments

Comments
 (0)