Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish
on:
push:
tags:
- '*' # Publish on any new tag
jobs:
build:
strategy:
matrix:
os: [windows-latest]
dotnet: [5.0.100]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Setup .Net Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore tools
run: dotnet tool restore
- name: Run Test
run: dotnet fake build
- name: Run build
run: dotnet fake build -t Pack
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/[email protected]
with:
version: ${{ github.ref }}
path: ./CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.log_entry }}
draft: false
prerelease: false
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: out/*.nupkg
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload binaries to nuget
env:
nuget-key: ${{ secrets.NUGET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet fake build -t Push