-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (35 loc) · 1.08 KB
/
publishPackage.yml
File metadata and controls
47 lines (35 loc) · 1.08 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
37
38
39
40
41
42
43
44
45
46
47
name: Publish Package
on:
push:
branches:
- 'master'
paths-ignore:
- 'static/**'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
publish:
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v1
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release --no-build --version-suffix $(Get-Date -Format "'preview'yyyyMMddHHmmss'+${{ github.sha }}'")
- name: Install NuGet
run: choco install nuget.commandline
- name: Add NuGet source
run: nuget sources Add -Name "GPR" -Source "https://nuget.pkg.github.com/mysql-net/index.json" -UserName bgrainger -Password ${{ secrets.GITHUB_TOKEN }}
- name: Publish packages
run: |
$files = Get-ChildItem -Path src -Filter *.nupkg -Recurse
foreach ($file in $files) {
nuget push $file -Source GPR
}