bump version #7
Workflow file for this run
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: 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: Checkout MonoBehaviour | |
uses: actions/checkout@v4 | |
with: | |
ref: MonoBehaviour | |
path: MonoBehaviour | |
- 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 MonoBehaviour | |
run: dotnet restore | |
working-directory: MonoBehaviour | |
- name: Build MonoBehaviour | |
run: dotnet build -c Release | |
working-directory: MonoBehaviour | |
- name: Prepare MonoBehaviour artifacts for release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Publish-MonoBehaviour | |
path: MonoBehaviour/bin/Publish | |
- 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/SFCore/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 SFCore.zip: ${{ steps.details.outputs.archiveHash }} | |
Attachments: | |
- SFCore.zip | |
- to be used for the ModInstaller | |
- SFCore.dll | |
- the mod, also inside SFCore.zip | |
- SFCoreUnity.dll | |
- the mod, to be used in a Unity project for the use of its MonoBehaviours | |
files: | | |
artifacts/Publish-Master/SFCore/SFCore.zip | |
artifacts/Publish-Master/SFCore/SFCore.dll | |
artifacts/Publish-MonoBehaviour/SFCore/SFCoreUnity.dll |