11# This script build Exiled and LabAPI version of HSM and release both DLLs with release note.
2- name : Build and Release
2+ name : Test
33
44on :
55 push :
66 tags :
77 - ' v*'
88 - ' V*'
9- workflow_dispatch :
109
1110jobs :
12- build-and-release :
11+ Test :
1312 runs-on : windows-latest
1413
1514 steps :
16- - name : Checkout source
17- uses : actions/checkout@v4
18-
19- - name : Setup MSBuild
20- uses : microsoft/setup-msbuild@v2
21-
22- - name : Restore NuGet packages
23- run : nuget restore HintServiceMeow.sln
24-
25- # Build for LabAPI
26- - name : Build with LabAPI
27- run : msbuild HintServiceMeow/HintServiceMeow.csproj /p:Platform=x64 /p:Configuration=Release /p:OutputPath=bin/Release/LabAPI/
28-
29- # Build for Exiled
30- - name : Build with Exiled
31- run : msbuild HintServiceMeow/HintServiceMeow.csproj /p:Platform=x64 /p:Configuration=Release /p:DefineConstants=EXILED /p:OutputPath=bin/Release/Exiled/
32-
33- # Rename output DLLs
34- - name : Rename output DLLs
35- run : |
36- mv HintServiceMeow/bin/Release/LabAPI/HintServiceMeow.dll HintServiceMeow/bin/Release/HintServiceMeow-LabAPI.dll
37- mv HintServiceMeow/bin/Release/Exiled/HintServiceMeow.dll HintServiceMeow/bin/Release/HintServiceMeow-Exiled.dll
38-
39- # Backup build result
40- - name : Upload build artifacts
41- uses : actions/upload-artifact@v4
42- with :
43- name : DLLs
44- path : |
45- HintServiceMeow/bin/Release/HintServiceMeow-LabAPI.dll
46- HintServiceMeow/bin/Release/HintServiceMeow-Exiled.dll
47-
48- # Get Tag name
4915 - name : Get tag name
5016 id : get_tag
17+ shell : bash
5118 run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
5219
53- # Get commit message
5420 - name : Get commit message
5521 id : get_commit_msg
22+ shell : bash
5623 run : |
5724 echo "commit_msg<<EOF" >> $GITHUB_OUTPUT
5825 git log -1 --pretty=%B >> $GITHUB_OUTPUT
5926 echo "EOF" >> $GITHUB_OUTPUT
60-
61- # Generate release
62- - name : Create Release and Upload DLLs
63- uses : softprops/action-gh-release@v2
64- with :
65- files : |
66- HintServiceMeow/bin/Release/HintServiceMeow-LabAPI.dll
67- HintServiceMeow/bin/Release/HintServiceMeow-Exiled.dll
68- body : |
69- ### ${{ steps.get_tag.outputs.tag }}
70- ${{ steps.get_commit_msg.outputs.commit_msg }}
7127
72- Please back up your older version before updating to the new version! If you have any issues, please let me know on the Discord server (and if applicable, pull up an issue on GitHub).
73- env :
74- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Debug tag
29+ run : echo "${{ steps.get_tag.outputs.tag }}"
30+ - name : Debug commit msg
31+ run : echo "${{ steps.get_commit_msg.outputs.commit_msg }}"
0 commit comments