Skip to content

Release & Publish

Release & Publish #30

# Build the tools, create zip-file, create a tag
# and release, and publish to Chocolatey.
# MANUAL TRIGGERED WORKFLOW
name: Release & Publish
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
# Checkout sources. Depth=0 is for using GitVersion
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
# Install and Setup GitVersion
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
# Step id is used as reference for the output values
- name: Use GitVersion to determine the version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
# Build the tools & create the zip-file and nuget packages
# Chocolatey tools are in .\tools. NuGet packages in .\artifacts
- name: Build & Package
run: pwsh .\build.ps1
# Create the CHANGELOG for this release
# We'll compile it from last the version
# to the current commit
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: "./changelog-config.json"
fromTag: ${{ steps.gitversion.outputs.VersionSourceSha }}
toTag: ${{ steps.gitversion.outputs.Sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}