-
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 945 Bytes
/
publish.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
name: NuGet Publish
run-name: ${{ github.actor }} is publishing (${{github.ref_name}}) 🚀
on:
workflow_dispatch:
release:
types: [published]
# push:
# tags:
# - v*.*.**
jobs:
publish-nuget-package:
name: Publish
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Set version
run: |
NEW_VERSION=$(echo "${{github.ref_name}}" | sed "s/^v//")
sed -i s/1.0.0/$NEW_VERSION/g S3FileProvider/S3FileProvider.csproj
- name: Pack
run: |
dotnet pack S3FileProvider -c Release -o publish
- name: Publish
run: |
dotnet nuget push publish/MrrHak.Extensions.FileProviders.S3FileProvider.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}