-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.44 KB
/
nugets.yml
File metadata and controls
39 lines (34 loc) · 1.44 KB
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: Publish nuget packages
on:
push:
paths:
- 'BattleBitAPI.Addons.CommandHandler/**.**'
- 'BattleBitAPI.Addons.Common/**.**'
- 'BattleBitAPI.Addons.EventHandler/**.**'
workflow_dispatch:
jobs:
publish-nuget-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Pack
if: "contains(github.event.head_commit.message, 'stable')"
run: |
dotnet pack BattleBitAPI.Addons.CommandHandler -c Release --no-build
dotnet pack BattleBitAPI.Addons.Common -c Release --no-build
dotnet pack BattleBitAPI.Addons.EventHandler -c Release --no-build
- name: Publish
if: "contains(github.event.head_commit.message, 'stable')"
run: |
dotnet nuget push BattleBitAPI.Addons.CommandHandler/**.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} -n --skip-duplicate
dotnet nuget push BattleBitAPI.Addons.Common/**.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} -n --skip-duplicate
dotnet nuget push BattleBitAPI.Addons.EventHandler/**.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} -n --skip-duplicate