RustyHearts-Launcher/.github/workflows/release.yml
dependabot[bot] 558af8a9b9
Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 13:12:51 +00:00

52 lines
No EOL
2.1 KiB
YAML

name: Release
on:
workflow_dispatch:
release:
types: [created]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
# Build with --self-contained false
- name: Build Rusty Hearts Launcher (No Self-Contained)
run: dotnet publish ./RHLauncher.sln --configuration Release --self-contained false --runtime win-x64 /p:PublishSingleFile=true /p:PublishDir=./publish/RustyHearts-Launcher_framework-dependent
- name: Zip output files (No Self-Contained)
run: Compress-Archive -Path "./publish/RustyHearts-Launcher_framework-dependent" -DestinationPath RustyHearts-Launcher-Framework-Dependent.zip
# Build with --self-contained true
- name: Build Rusty Hearts Launcher (Self-Contained)
run: dotnet publish ./RHLauncher.sln --configuration Release --self-contained true --runtime win-x64 /p:PublishSingleFile=false /p:PublishDir=./publish/RustyHearts-Launcher_self-contained
- name: Zip output files (Self-Contained)
run: Compress-Archive -Path "./publish/RustyHearts-Launcher_self-contained" -DestinationPath RustyHearts-Launcher-SelfContained.zip
- name: Get version from compiled assembly
id: version
run: |
$version = (Get-Command "./publish/RustyHearts-Launcher_self-contained/Launcher.dll").FileVersionInfo.FileVersion
echo "::set-output name=version::$version"
# Create Release and Upload Assets using softprops/action-gh-release
- name: Create GitHub Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
body: Automated pre-release created by GitHub Actions.
draft: true
prerelease: true
files: |
./RustyHearts-Launcher-Framework-Dependent.zip
./RustyHearts-Launcher-SelfContained.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}