-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (30 loc) · 1.09 KB
/
release.yml
File metadata and controls
31 lines (30 loc) · 1.09 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
name: Release
on:
# Trigger the workflow on push only for master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Configure secrets
run: |
dotnet user-secrets init --project Test/Test.Postmates.NET/Test.Postmates.NET.csproj \
&& dotnet user-secrets set "Postmates.ServiceApiKey" ${{ secrets.SANDBOX_KEY }} --project Test/Test.Postmates.NET/Test.Postmates.NET.csproj \
&& dotnet user-secrets set "Postmates.CustomerId" ${{ secrets.CUSTOMER_ID }} --project Test/Test.Postmates.NET/Test.Postmates.NET.csproj
- name: run tests
run: dotnet test Test/Test.Postmates.NET/Test.Postmates.NET.csproj
- name: Publish if version is updated
uses: rohith/publish-nuget@v1
with:
project_dir: src/Postmates.NET
tag_format: v*
nuget_key: ${{ secrets.NUGET }} # nuget.org API key