Skip to content

Commit

Permalink
Move to GitHub actions (loic-sharma#663)
Browse files Browse the repository at this point in the history
Move to GitHub actions. Upgrade sample project to .NET 3.1 TFM for long term support.
  • Loading branch information
loic-sharma authored Jul 11, 2021
1 parent 5fbcc5e commit 96f0dc0
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 108 deletions.
107 changes: 0 additions & 107 deletions .azure/pipelines/ci-official.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to nuget.org

on:
workflow_dispatch:
inputs:
packageVersion:
description: 'Package version'
required: true
default: '1.0.0-preview1'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack --configuration Release -p:PackageVersion=${{ github.event.inputs.packageVersion }}
- name: Push
run: dotnet nuget push ./bin/Release/*.nupkg -s https://dev.nugettest.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
<NoWarn>IDE0007</NoWarn>
Expand Down

0 comments on commit 96f0dc0

Please sign in to comment.