forked from AuthorizeNet/sdk-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.46 KB
/
dotnetcore.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
name: .NET Core
on: push
# vm contents
# https://github.com/actions/virtual-environments/tree/main/images/linux
# shell notes
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
# default env vars:
# https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
jobs:
build:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 2.1.809
- name: dotnet clean
run: |
cd "Authorize.NET"
dotnet clean
- name: dotnet build
run: |
cd "Authorize.NET"
$branch = @($env:GITHUB_REF -split "/")[-1]
if($branch -eq "master")
{
dotnet build --configuration Release
dotnet pack --no-build --configuration Release --version-suffix "$runNumber" -o out
}else {
$runNumber = $env:GITHUB_RUN_NUMBER
dotnet build --configuration Release --version-suffix "$branch$runNumber"
dotnet pack --no-build --configuration Release --version-suffix "$branch$runNumber" -o out
}
shell: pwsh
- name: publish to nuget
run: |
dotnet nuget push "./Authorize.NET/out/*.nupkg" -k ${{ secrets.Nuget_tristan }} -s https://api.nuget.org/v3/index.json
shell: pwsh