Skip to content

use gh CLI for tag releases #32

use gh CLI for tag releases

use gh CLI for tag releases #32

Workflow file for this run

name: Automated Test Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
branches:
- 'master'
jobs:
build:
runs-on: windows-2022
env:
Solution_Name: WindBot.sln
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
run: nuget restore $env:Solution_Name
- name: Build
run: msbuild $env:Solution_Name /t:Build /p:Configuration=Release
- name: Pack
run: |
mkdir dist
xcopy /e /y bin\Release dist\WindBot\
xcopy /y BotWrapper\bin\Release\bot.conf dist\
xcopy /y BotWrapper\bin\Release\bot.exe dist\
tar -C dist -czvf WindBot.tar.gz *
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
run: |
gh release create "$TAG_NAME" WindBot.tar.gz --title "$TAG_NAME" --generate-notes