Skip to content

Commit 96f0dc0

Browse files
authored
Move to GitHub actions (loic-sharma#663)
Move to GitHub actions. Upgrade sample project to .NET 3.1 TFM for long term support.
1 parent 5fbcc5e commit 96f0dc0

File tree

4 files changed

+60
-108
lines changed

4 files changed

+60
-108
lines changed

.azure/pipelines/ci-official.yml

-107
This file was deleted.

.github/workflows/main.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the main branch
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 3.1.x
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Build
26+
run: dotnet build --no-restore
27+
- name: Test
28+
run: dotnet test --no-build --verbosity normal

.github/workflows/publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to nuget.org
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
packageVersion:
7+
description: 'Package version'
8+
required: true
9+
default: '1.0.0-preview1'
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 3.1.x
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build --no-restore
26+
- name: Test
27+
run: dotnet test --no-build --verbosity normal
28+
- name: Pack
29+
run: dotnet pack --configuration Release -p:PackageVersion=${{ github.event.inputs.packageVersion }}
30+
- name: Push
31+
run: dotnet nuget push ./bin/Release/*.nupkg -s https://dev.nugettest.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}

samples/BaGet.Protocol.Samples.Tests/BaGet.Protocol.Samples.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
<NoWarn>IDE0007</NoWarn>

0 commit comments

Comments
 (0)