-
-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (31 loc) · 1.34 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build Src/Switch/Switch.csproj --configuration Release --no-restore
- name: Create NuGet package
run: dotnet pack Src/Switch/Switch.csproj -c Release --no-build -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/IeuanWalker/Xamarin.Forms.Breadcrumb/releases/tag/${{ github.event.release.tag_name }}"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: NuGet package
path: "**/IeuanWalker.CustomSwitch.${{ github.event.release.tag_name }}.nupkg"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: NuGet package
path: "**/IeuanWalker.CustomSwitch.${{ github.event.release.tag_name }}.snupkg"
- name: Publish NuGet package
run: dotnet nuget push **/IeuanWalker.CustomSwitch.${{ github.event.release.tag_name }}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json