Skip to content

Publish

Publish #10

Workflow file for this run

name: Publish
on:
push:
tags:
- '*'
branches:
- master
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
publish-linux:
name: PublishLinux
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache packages
uses: actions/cache@v2
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('.config/dotnet-tools.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Setup .NET 6.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.405
- name: Docker Hub login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Publish
shell: bash
run: |
dotnet tool restore
dotnet cake --target="Publish"
publish-windows:
name: PublishWindows
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache packages
uses: actions/cache@v2
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('.config/dotnet-tools.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Setup .NET 6.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.405
- name: Docker Hub login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Publish
run: |
dotnet tool restore
dotnet cake --image-directory="windows.ltsc2019" --target="Publish"