-
-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (33 loc) · 1.23 KB
/
dotnetcore.yml
File metadata and controls
37 lines (33 loc) · 1.23 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
name: .NET Core App CI to Docker Hub
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
TAG_NUMBER: $GITHUB_RUN_NUMBER
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.400
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
# Optionally strip `v` prefix
strip_v: true
- name: Set VERSION variable from tag
run: echo ${{steps.tag.outputs.tag}}
- name: Build with dotnet
run: dotnet build --configuration Release src/RabbitMQ.EventBus.AspNetCore
- name: Pack
run: dotnet pack src/RabbitMQ.EventBus.AspNetCore -c Release --include-symbols --include-source -p:PackageVersion=${{steps.tag.outputs.tag}} -o artifacts/
- name: Publish Symbols to NuGet
run: dotnet nuget push artifacts/*.symbols.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
- name: Add Source Github NuGet
run: dotnet nuget add source --username ojdev --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/OWNER/index.json"