-
Notifications
You must be signed in to change notification settings - Fork 22
39 lines (34 loc) · 1009 Bytes
/
push_to_nuget.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
name: Package and push ontology to nuget.org
on:
workflow_dispatch:
release:
types:
- released
- prereleased
env:
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 'Setup Nuget'
uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.x'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Configure package generation directory
run: |
mkdir build
cp Metadata/Willow*.jsonld build/
cp Metadata/*.nuspec build/
cp Metadata/ReadMe.md build/
- name: 'Run nuget pack'
run: nuget pack build/*.nuspec -OutputDirectory build
- name: 'Publish to nuget.org'
run: nuget push build/*.nupkg -Source "${{ env.NUGET_FEED_URL }}" -SkipDuplicate