Skip to content

Update

Update #7

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
strategy:
matrix:
os: [ubuntu-latest]
dotnet: [6.0.402]
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
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore
run: dotnet tool restore && dotnet run restore
- name: Run tests
run: dotnet run test
- name: Pack
run: dotnet run pack ${{ steps.tag_name.outputs.current_version }}
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/[email protected]
with:
version: ${{ steps.tag_name.outputs.current_version }}
- 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.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: deploy/*.nupkg
tag: ${{ github.ref }}
overwrite: true
file_glob: true