Skip to content

Commit 2304233

Browse files
committed
[CI] Add nuget workflow
1 parent 96d2457 commit 2304233

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: docs
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "v[0-9]+.[0-9]+.[0-9]+"
77

88
permissions:
99
contents: write

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
permissions: write-all
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 9.0.x
21+
- name: Restore project
22+
run: dotnet restore
23+
- name: Build project
24+
run: dotnet build -c Release --no-restore
25+
- name: Pack
26+
run: dotnet pack -c Release --output .
27+
- name: Push
28+
env:
29+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
dotnet nuget push *.nupkg \
32+
--source "https://nuget.pkg.github.com/B2R2-org/index.json" \
33+
--api-key ${TOKEN}

0 commit comments

Comments
 (0)