Skip to content

Commit 1cd174d

Browse files
committed
chore: manual version release on demand
1 parent 24cf1a9 commit 1cd174d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish custom NuGet package version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
package_version:
6+
description: 'NuGet package version (e.g. 6.0.0-beta.1041)'
7+
required: true
8+
9+
jobs:
10+
pre-release:
11+
runs-on: ubuntu-latest
12+
name: Publish NuGet packages
13+
environment: AsyncAPI
14+
strategy:
15+
matrix:
16+
package-name: [ "LEGO.AsyncAPI", "LEGO.AsyncAPI.Readers", "LEGO.AsyncAPI.Bindings" ]
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v1
20+
21+
- name: Setup .NET Core @ Latest
22+
uses: actions/setup-dotnet@v1
23+
24+
- name: Build ${{ matrix.package-name }} project and pack NuGet package
25+
run: dotnet pack src/${{ matrix.package-name }}/${{ matrix.package-name }}.csproj -c Release -o out-${{ matrix.package-name }} -p:PackageVersion=${{ github.event.inputs.package_version }}
26+
27+
- name: Push generated package to NuGet
28+
run: dotnet nuget push out-${{ matrix.package-name }}/*.nupkg -s https://api.nuget.org/v3/index.json --skip-duplicate -n --api-key ${{secrets.NUGET}}

0 commit comments

Comments
 (0)