Skip to content

Publish

Publish #60

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*' # Publish on any new tag matching v*, i.e. v1.0, v1.7.2
jobs:
build:
strategy:
matrix:
os: [windows-latest]
dotnet: ['6.0.x']
runs-on: ${{ matrix.os }}
steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet }}
include-prerelease: true
- name: Restore tools
run: dotnet tool restore
- name: Run Test
run: dotnet build -c Release -t:Test
- name: Run build
run: dotnet build -c Release -t:Pack
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
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: bin/nupkg/*.nupkg
tag: ${{ github.ref }}
overwrite: true
file_glob: true