This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.57 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}