Skip to content

Commit

Permalink
Merge pull request #101 from MADE-Apps/feature/workflow-ci
Browse files Browse the repository at this point in the history
Fixed CI for releases and updated sample projects to .NET 6.0
  • Loading branch information
jamesmcroft authored Nov 11, 2021
2 parents 78359d9 + 3dcd627 commit 39ba7c9
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 25 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
name: CI

on:
create:
branches:
- release/**
push:
tags:
- v*
branches:
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- .github/workflows/ci.yml
pull_request:
branches:
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- .github/workflows/ci.yml
workflow_dispatch:

Expand All @@ -40,20 +43,20 @@ jobs:
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore dependencies
run: nuget restore $SOLUTION

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=$BUILD_VERSION --no-restore

- name: Publish
if: startsWith(github.ref, 'refs/heads/release')
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
17 changes: 9 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,38 @@ on:
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
pull_request:
branches:
- main
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
workflow_dispatch:

jobs:
generate-docs:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
dotnet-version: 6.0.x

- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx

- name: DocFX Build
working-directory: docs
run: docfx .\docfx.json
continue-on-error: false

- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion samples/AndroidCoreSamples/AndroidCoreSamples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/MADESampleApp/MADESampleApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/TelerikUwpSdkSample/TelerikUwpSdkSample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/W3SchoolsWebTests/W3SchoolsWebTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/WebTests/WebTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/WindowsAlarmsAndClock/WindowsAlarmsAndClock.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/XamlControlsGallery/XamlControlsGallery.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 39ba7c9

Please sign in to comment.