forked from NuGet/NuGet.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.61 KB
/
dotnet-core.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
53
54
55
56
57
58
59
60
61
62
63
64
on:
push:
env:
dotnet-version: 5.0.100-preview.2.20176.6
source-url: "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- run: .\configure.ps1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- run: .\build.ps1 -SkipUnitTest
- uses: actions/upload-artifact@v2
with:
name: nuget
path: ${{ github.workspace }}/artifacts/NuGet.CommandLine.XPlat/16.0/bin/Debug/netcoreapp5.0/**/*
publish:
needs: build
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
try: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/download-artifact@v2
with:
name: nuget
path: ${{ github.workspace }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
source-url: ${{ env.source-url }}
env:
NUGET_AUTH_TOKEN: '%NUGET_AUTH_TOKEN%'
- run: |
dotnet new console
dotnet pack -p:RepositoryUrl=${{ github.server_url }}/${{ github.repository }} -p:Version=${{ env.version }}
env:
version: 1.0.0-g${{ github.sha }}-${{ strategy.job-index }}-$(date +%F-%H%M%S)
- name: Publish package
shell: bash
run: dotnet NuGet.CommandLine.XPlat.dll push bin/Debug/*.nupkg -s ${{ env.source-url }}
env:
NUGET_AUTH_TOKEN: "${{ github.token }}"