-
Notifications
You must be signed in to change notification settings - Fork 8
30 lines (22 loc) · 872 Bytes
/
Copy pathdotnet.yml
File metadata and controls
30 lines (22 loc) · 872 Bytes
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
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
container:
# https://hub.docker.com/_/microsoft-dotnet-sdk
image: mcr.microsoft.com/dotnet/sdk:5.0
steps:
- name: git checkout
uses: actions/checkout@v1
- name: pack
shell: sh
run: ./cake.sh --target pack
- name: push to nuget
if: ${{ contains(github.event.head_commit.message,'--push') }}
shell: sh
run: dotnet nuget push dist/pack/** --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source "https://api.nuget.org/v3/index.json"
- name: push to github
if: ${{ contains(github.event.head_commit.message,'--push') }}
shell: sh
run: dotnet nuget push dist/pack/** --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/linianhui/index.json"