From df897d1d0434707e4102f1af1d9b743e7875a1af Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:01:29 +1000 Subject: [PATCH] CI Updates - Update github actions script to suit new build process - Fix CI warning by updating action-gh-release version - Add dummy.txt to ensure all scripts always get re-compiled --- .github/workflows/pr_compile_scripts.yml | 70 +++++++++++------------- Update/dummy.txt | 5 ++ 2 files changed, 36 insertions(+), 39 deletions(-) create mode 100644 Update/dummy.txt diff --git a/.github/workflows/pr_compile_scripts.yml b/.github/workflows/pr_compile_scripts.yml index a70d78f..caa812b 100644 --- a/.github/workflows/pr_compile_scripts.yml +++ b/.github/workflows/pr_compile_scripts.yml @@ -6,61 +6,53 @@ on: jobs: dll_build: - name: Build DLL + name: Build DLL and Standalone Compiler runs-on: ubuntu-latest + permissions: + contents: write + strategy: + matrix: + python-version: [3.8] steps: - - name: Checkout the repository - uses: actions/checkout@v3 + - name: Force git to use CRLF (on ubuntu runner, will checkout as LF otherwise) + run: git config --global core.autocrlf true # Forces LF on the server to convert to CRLF locally + + - name: Checkout the script repository + uses: actions/checkout@v4 + + - name: Checkout the higurashi-assembly (DLL) repository + uses: actions/checkout@v4 with: repository: 07th-mod/higurashi-assembly ref: tsumi-mod + path: ./dll/ # Note: This uses the mono bundled with Ubuntu to build the project - - name: Compile project + - name: Compile DLL run: msbuild /p:Configuration=Release + working-directory: ./dll/ + + - name: Compile standalone Higurashi Script Compiler + run: msbuild /p:Configuration=ScriptCompiler + working-directory: ./dll/ - name: Save Git Hash run: >- git show --pretty="format:Commit: %H %d%nDate: %cs%n%n%B" --no-patch > ./bin/Release/Assembly-CSharp.version.txt + working-directory: ./dll/ - - name: Upload DLL as Artifact - uses: actions/upload-artifact@v3 - with: - name: higurashi-dll - path: | - ./bin/Release/Assembly-CSharp.dll - ./bin/Release/Assembly-CSharp.version.txt - if-no-files-found: error - - windows_build: - name: Windows Build - needs: dll_build - runs-on: windows-latest - permissions: - contents: write - strategy: - matrix: - python-version: [3.8] - steps: - - name: Checkout the repository - uses: actions/checkout@v3 + - name: Move bin/ folder out of dll/ folder + run: mv ./dll/bin/ . - # Download Windows artifacts - - name: Download DLL - uses: actions/download-artifact@v3 - with: - name: higurashi-dll - - # Setup python (Windows VM is Python 3.7 by default, we need at least Python 3.8) - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} + # At this point the following important files should exist in the './bin/' folder + # ./bin/ScriptCompiler/System.Core.dll + # ./bin/ScriptCompiler/Antlr3.Runtime.dll + # ./bin/ScriptCompiler/HigurashiScriptCompiler.exe + # ./bin/Release/Assembly-CSharp.dll + # ./bin/Release/Assembly-CSharp.version.txt - name: Run Release Script id: run_release - env: - HIGURASHI_BASE_EXTRACT_KEY: ${{ secrets.HIGURASHI_BASE_EXTRACT_KEY }} run: | curl -OJ https://raw.githubusercontent.com/07th-mod/higurashi_release/master/deploy_higurashi/deploy_higurashi.py python deploy_higurashi.py ${{ github.event.repository.name }} @@ -68,7 +60,7 @@ jobs: # Publish a release - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') # only publish tagged commits with: files: | diff --git a/Update/dummy.txt b/Update/dummy.txt new file mode 100644 index 0000000..d973a27 --- /dev/null +++ b/Update/dummy.txt @@ -0,0 +1,5 @@ + +void main() +{ + +} \ No newline at end of file