CI: Add support for tag releases #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore NuGet Packages | |
run: msbuild Andraste.Payload.Generic.csproj /t:Restore | |
- name: Build project | |
run: msbuild Andraste.Payload.Generic.csproj /p:Configuration=Release /p:Platform=x86 /t:Build | |
- name: Zip Release Bundle | |
uses: vimtor/[email protected] | |
with: | |
files: bin\Release\net48\ | |
dest: Andraste-Payload-Generic-${{ github.ref_name }}.zip | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: Andraste-Payload-Generic-${{ github.ref_name }}.zip | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |