Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-62) update to cake.recipe 2.0.0 #63

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test: off
build: off

build_script:
- ps: .\build.ps1 -Target AppVeyor
- ps: .\build.ps1 --target=CI

cache:
- "tools -> recipe.cake,tools/packages.config"
- "tools -> recipe.cake,.config/dotnet-tools.json"
26 changes: 26 additions & 0 deletions .azure-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
trigger:
branches:
include:
- main
- develop
- 'release/*'
- 'hotfix/*'
- 'feature/*'
tags:
include: [] # not sure, if that's the default...

pool:
vmImage: 'windows-latest'

steps:
- task: Cache@2
inputs:
key: '"$(Agent.OS)" | recipe.cake | .config/dotnet-tools.json'
path: 'tools'
- task: Cake@2
inputs:
script: 'recipe.cake'
target: 'CI'
verbosity: 'Diagnostic'
Bootstrap: true
Version: '0.38.4'
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.4",
"commands": [
"dotnet-cake"
]
}
}
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
ignore:
- "Cake.Core"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
71 changes: 71 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build

on:
push:
branches:
- main
- develop
- "release/**"
- "hotfix/**"
- "feature/**"
tags-ignore:
- "*"
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
#https://github.saobby.my.eu.orgmunity/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/4
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2.2.0
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/cache@v2
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('.config/dotnet-tools.json') }}
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1.5.0
with:
dotnet-version: 2.1.809
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1.5.0
with:
dotnet-version: 3.1.107
- name: .net SxS Unix
if: matrix.os != 'windows-latest'
run: rsync -a ${DOTNET_ROOT/3.1.107/2.1.809}/* $DOTNET_ROOT/
- name: .net Sxs Windows
if: matrix.os == 'windows-latest'
run: |
SET DOTNET_31_ROOT=%DOTNET_ROOT:3.1.107=2.1.809%
xcopy /s /y /d %DOTNET_31_ROOT% %DOTNET_ROOT%
shell: cmd
- name: Build project
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: CI
verbosity: Diagnostic
cake-version: 0.38.4
cake-bootstrap: true
# currently, Cake.Recipe does not upload artifacts when run on gh-actions
- name: Upload Issues
uses: actions/upload-artifact@v2
with:
if-no-files-found: warn
name: ${{ matrix.os }} Issues
path: BuildArtifacts/report.html
- name: Upload Packages
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
with:
if-no-files-found: warn
name: package
path: BuildArtifacts/Packages/**/*
21 changes: 16 additions & 5 deletions .github/workflows/publishDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
WYAM_ACCESS_TOKEN: ${{ secrets.API_TOKEN }}
# secrets.GITHUB_TOKEN has no permissions to push, sadly.
WYAM_DEPLOY_BRANCH: 'gh-pages'
#WYAM_DEPLOY_REMOTE: does not exist in any context, will be dynamically set - see below
WYAM_DEPLOY_REMOTE: "${{ github.event.repository.html_url }}"

jobs:
cake:
Expand All @@ -20,8 +20,19 @@ jobs:
uses: actions/checkout@v2 #https://github.com/actions/checkout
with:
fetch-depth: 0 # GitVersion is somewhat irritated when fetch-depth is "1"....
ref: ${{ github.event.ref }}

- name: call cake
run: |
$env:WYAM_DEPLOY_REMOTE = $( git remote get-url --push origin )
.\build.ps1 -Target PublishDocs -Verbosity Diagnostic
- name: Cache Tools
uses: actions/cache@v2
with:
path: tools
key: ${{ runner.os }}-doc-tools-${{ hashFiles('recipe.cake') }}

- name: Publishing documentaiton
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: PublishDocs
verbosity: Diagnostic
cake-version: 0.38.4
cake-bootstrap: true
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
# GhostDoc plugin settings file
*.GhostDoc.xml

# Ignore cake tools directory, except packages.config
# Ignore cake tools directory
tools/*
!tools/packages.config

# Ignore build artifacts
BuildArtifacts/
Expand Down
Loading