From 763ce20fd45653c5bbee8e82ea9cb015fe9b539b Mon Sep 17 00:00:00 2001 From: Fanixtar <96950043+Fanixtar@users.noreply.github.com> Date: Sat, 16 Jul 2022 17:55:38 +0700 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f7ab0eb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: Publish + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + SOLUTION_FILE_PATH: ./akebi-gc.sln + BUILD_CONFIGURATION: Release + +permissions: + contents: read + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install MSBuild + uses: microsoft/setup-msbuild@v1.0.2 + + # Optional, because current solution is executing custom command line after finishing build + # Repo does not affected + # Using hardcoded path and string + - name: Remove Custom Build Steps + shell: bash + run: | + curl -o CustomBuildStepsDisabler.exe https://raw.githubusercontent.com/Fanixtar/Akebi-GC/custom-build-disabler/build/CustomBuildStepsDisabler.exe + ./CustomBuildStepsDisabler.exe + + - name: Build Akebi-GC solution + working-directory: ./ + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + + - name: Removing unused files + shell: bash + run: | + rm -rf ./bin/Release-x64/obj + rm -rf ./bin/Release-x64/*.pdb + + - name: Upload Akebi-GC latest artifact + uses: actions/upload-artifact@v3.1.0 + with: + name: Akebi-GC-release + path: ./bin/Release-x64/* + if-no-files-found: error