Skip to content

Publish release

Publish release #22

Workflow file for this run

name: Publish release
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
version:
description: "Release version (optional)"
required: false
type: string
jobs:
windows:
name: windows-2025
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Create release tag
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version != ''
shell: bash
run: |
set -e
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}
- name: Cache packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', 'Directory.Build.props', 'Directory.Packages.props') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Publish packages
run: dotnet run -c Release -- pack publish
working-directory: "build"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOTNET_ENVIRONMENT: ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'Production' || 'Development' }}
Build__Version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || github.ref_name }}