Skip to content

Fix locked bench edge cases in bench sync #123

Fix locked bench edge cases in bench sync

Fix locked bench edge cases in bench sync #123

Workflow file for this run

name: Build
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ "main" ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MAPI
uses: BadMagic100/setup-hk@v2
with:
apiPath: API
dependencyFilePath: Archipelago.HollowKnight/ModDependencies.txt
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c $Env:BUILD_CONFIGURATION
env:
BUILD_CONFIGURATION: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && 'Release' || 'Debug' }}
- name: Prepare artifacts for release
uses: actions/upload-artifact@v4
with:
name: Archipelago
path: Archipelago.HollowKnight/bin/Publish
release:
needs:
- build
runs-on: windows-latest
# only make a release if we tagged for it
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
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/Archipelago/SHA.txt
echo "archiveHash=$sha" >> $env:GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: false
generate_release_notes: true
fail_on_unmatched_files: true
body: |
SHA256: ${{ steps.details.outputs.archiveHash }}
files: |
artifacts/Archipelago/Archipelago.zip