Skip to content

Use environment variable in NuGet restore step #14

Use environment variable in NuGet restore step

Use environment variable in NuGet restore step #14

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@v4
with:
fetch-depth: 0
- 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: Upload build artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
path: WindBot.tar.gz
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: salix5/action-automatic-releases@75f1a65738686fd56793b41982fd0ed01cc8e96c
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
WindBot.tar.gz