Skip to content

Commit

Permalink
CI: Add support for tag releases
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFisto94 committed May 6, 2024
1 parent ed166d8 commit 10271f3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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 }}

0 comments on commit 10271f3

Please sign in to comment.