-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Full Build | ||
|
||
permissions: | ||
contents: write | ||
|
||
# Trigger when pushing tags | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
path: master | ||
|
||
- name: Setup MAPI | ||
uses: BadMagic100/setup-hk@v2 | ||
with: | ||
apiPath: HkRefs | ||
dependencyFilePath: master/ModDependencies.txt | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
|
||
- name: Install dependencies master | ||
run: dotnet restore | ||
working-directory: master | ||
|
||
- name: Build master | ||
run: dotnet build -c Release | ||
working-directory: master | ||
|
||
- name: Prepare master artifacts for release | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Publish-Master | ||
path: master/bin/Publish | ||
|
||
release: | ||
needs: | ||
- build | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
|
||
- name: Get build details | ||
id: details | ||
# this assumes that an MSBuild task that writes the SHA256 of the zip file to SHA.txt, and the mod version (usually | ||
# the same as the assembly version) to version.txt. The contents of these files are read to step outputs for use in release | ||
run: | | ||
$sha = (Get-Content artifacts/Publish-Master/CustomBgm/SHA.txt)[3] | ||
$ver = "${{ github.ref_name }}" | ||
echo "archiveHash=$sha" >> $env:GITHUB_OUTPUT | ||
echo "buildVersion=$ver" >> $env:GITHUB_OUTPUT | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: false | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
tag_name: ${{ steps.details.outputs.buildVersion }} | ||
body: | | ||
SHA256 of CustomBgm.zip: ${{ steps.details.outputs.archiveHash }} | ||
Attachments: | ||
- CustomBgm.zip | ||
- to be used for the ModInstaller | ||
- CustomBgm.dll | ||
- the mod, also inside CustomBgm.zip | ||
files: | | ||
artifacts/Publish-Master/CustomBgm/CustomBgm.zip | ||
artifacts/Publish-Master/CustomBgm/CustomBgm.dll |
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
Empty file.