Skip to content

Xenial.Tasty

Xenial.Tasty #891

Workflow file for this run

name: Xenial.Tasty
on:
schedule:
- cron: "30 0 * * *"
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Setup .NET8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet run --project build/Tasty.Build/Tasty.Build.csproj pack
- uses: actions/upload-artifact@v4
if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/v')
with:
name: nuget
path: artifacts/nuget/
docs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
# Remove global json cause wyam needs 2.2
- name: Delete global.json
run: |
del global.json
- name: Setup .NET Core 2.2
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.x
# Install with a tool location to trick tool resolution
- name: Install Wyam.Tool
run: dotnet tool install --tool-path c:\dotnet-tools Wyam.Tool
# Run from the installed tool location
- name: Build
run: c:\dotnet-tools\wyam.exe docs -o ..\artifacts\docs
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: docs
path: artifacts/docs/
deploy-docs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [docs]
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: artifacts/docs/
- name: Upload ftp
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_HOST }}
user: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASS }}
localDir: artifacts/docs/
deploy-packages:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- uses: actions/download-artifact@v4
with:
name: nuget
path: artifacts/nuget/
- name: Setup .NET8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Publish to nuget.org
run: dotnet run --project build/Tasty.Build/Tasty.Build.csproj deploy.nuget
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}