A lot of logic and pin fixes #7
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: Build and Publish | |
on: | |
push: | |
branches: main | |
pull_request: | |
jobs: | |
build: | |
name: Build and create release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Fetch Unity Engine modules | |
run: | | |
wget https://files.catbox.moe/i4sdl6.zip -O UnityModules.zip | |
unzip UnityModules.zip -d References | |
- name: Fetch API files | |
run: | | |
wget https://github.com/hk-modding/api/releases/latest/download/ModdingApiWin.zip -O API.zip | |
unzip -o API.zip -d References | |
- name: Fetch FStats | |
run: | | |
wget https://github.com/flibber-hk/HollowKnight.FStats/releases/latest/download/FStats.zip -O FStats.zip | |
unzip -o FStats.zip -d References | |
- name: Fetch ItemChanger | |
run: | | |
wget https://github.com/homothetyhk/HollowKnight.ItemChanger/releases/latest/download/ItemChanger.zip -O ItemChanger.zip | |
unzip -o ItemChanger.zip -d References | |
- name: Fetch KorzUtils | |
run: | | |
wget https://github.com/Korzer420/KorzUtils/releases/latest/download/KorzUtils.zip -O KorzUtils.zip | |
unzip -o KorzUtils.zip -d References | |
- name: Fetch MenuChanger | |
run: | | |
wget https://github.com/homothetyhk/HollowKnight.MenuChanger/releases/latest/download/MenuChanger.zip -O MenuChanger.zip | |
unzip -o MenuChanger.zip -d References | |
- name: Fetch MoreLocations | |
run: | | |
wget https://github.com/BadMagic100/MoreLocations/releases/latest/download/MoreLocations.zip -O MoreLocations.zip | |
unzip -o MoreLocations.zip -d References | |
- name: Fetch RandoSettingsManager | |
run: | | |
wget https://github.com/BadMagic100/RandoSettingsManager/releases/latest/download/RandoSettingsManager.zip -O RandoSettingsManager.zip | |
unzip -o RandoSettingsManager.zip -d References | |
- name: Fetch RandomizerCore | |
run: | | |
wget https://github.com/homothetyhk/RandomizerCore/releases/latest/download/RandomizerCore.zip -O RandomizerCore.zip | |
unzip -o RandomizerCore.zip -d References | |
- name: Fetch RandomizerCore.JSON | |
run: | | |
wget https://github.com/homothetyhk/RandomizerCore.Json/releases/latest/download/RandomizerCore.Json.zip -O RandomizerCore.Json.zip | |
unzip -o RandomizerCore.Json.zip -d References | |
- name: Fetch RandomizerMod | |
run: | | |
wget https://github.com/homothetyhk/RandomizerMod/releases/latest/download/RandomizerMod.zip -O RandomizerMod.zip | |
unzip -o RandomizerMod.zip -d References | |
- name: Fetch Satchel | |
run: | | |
wget https://github.com/PrashantMohta/Satchel/releases/latest/download/Satchel.zip -O Satchel.zip | |
unzip -o Satchel.zip -d References | |
- name: Setup MSBuild | |
run: sudo apt-get install -y nuget mono-devel mono-xbuild | |
- name: Restore packages | |
run: nuget restore BreakableWallRandomizer.csproj | |
- name: Build project | |
run: dotnet build --configuration Release | |
- name: Get SHA256 of zipped mod | |
id: get_hash | |
run: echo "::set-output name=hash::$(sha256sum Output/BreakableWallRandomizer.zip | cut -d ' ' -f 1)" | |
- name: Get Assembly version | |
id: get_version | |
run: echo "::set-output name=version::$(cat < Version.txt)" | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.version }} | |
release_name: Release v${{ steps.get_version.outputs.version }} | |
body: "SHA256: ${{ steps.get_hash.outputs.hash }}" | |
draft: false | |
prerelease: false | |
- name: Upload release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: Output/BreakableWallRandomizer.zip | |
asset_name: BreakableWallRandomizer.zip | |
asset_content_type: application/zip |