This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
Release #2
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: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build RHGMTool | |
run: dotnet publish --configuration Release --self-contained false --runtime win-x86 /p:PublishSingleFile=false --output ./publish/RHGMTool | |
- name: Get version from compiled assembly | |
id: version | |
run: | | |
$version = (Get-Command "./publish/RHGMTool/Rusty Hearts GM Tool.dll").FileVersionInfo.FileVersion | |
echo "::set-output name=version::$version" | |
- name: Zip output files | |
run: Compress-Archive -Path "./publish/RHGMTool" -DestinationPath RH_GM_Tool.zip | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: v${{ steps.version.outputs.version }} | |
release_name: v${{ steps.version.outputs.version }} | |
body: Automated release created by GitHub Actions. | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./RH_GM_Tool.zip | |
asset_name: RH_GM_Tool.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |