-
Notifications
You must be signed in to change notification settings - Fork 18
52 lines (46 loc) · 1.62 KB
/
release-internal.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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Publish beta NuGet package
on:
push:
branches: [ main ]
paths:
- 'src/LEGO.AsyncAPI/**'
- 'src/LEGO.AsyncAPI.Readers/**'
- 'src/LEGO.AsyncAPI.Bindings/**'
- ".github/workflows/release-internal.yml"
- '!**/*.md'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
name: Check release
environment: AsyncAPI
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v3
with:
dry_run: true
ci: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
version: ${{ steps.semantic.outputs.new_release_version }}
pre-release:
runs-on: ubuntu-latest
name: Publish NuGet packages
needs: check
environment: AsyncAPI
strategy:
matrix:
package-name: [ "LEGO.AsyncAPI", "LEGO.AsyncAPI.Readers", "LEGO.AsyncAPI.Bindings" ]
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup .NET Core @ Latest
uses: actions/setup-dotnet@v1
- name: Build ${{ matrix.package-name }} project and pack NuGet package
run: dotnet pack src/${{ matrix.package-name }}/${{ matrix.package-name }}.csproj -c Release -o out-${{ matrix.package-name }} -p:PackageVersion=${{ needs.check.outputs.version }}-beta.${{github.run_number}}
- name: Push generated package to GitHub Packages registry
run: dotnet nuget push out-${{ matrix.package-name }}/*.nupkg -s https://api.nuget.org/v3/index.json --skip-duplicate -n --api-key ${{secrets.NUGET}}