From a76e23bd14f6de1a92ca5961839835daf840fba5 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Sun, 23 Jul 2023 08:02:02 +0400 Subject: [PATCH] Add GA plogon deployment Lets see if this works first try or not --- .github/workflows/build.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d6eea61 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,64 @@ +name: Build +# Put your personal access token in a repository secret named PAT for cross-repository access +on: + push: + tags: + - '*' + +env: + PLUGIN_REPO: WorkingRobot/MyDalamudPlugins + PROJECT_NAME: Craftimizer + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.0.3 + + - name: Download Dalamud + run: | + Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip + Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\" + - name: Build + run: | + dotnet restore -r win ${{ env.PROJECT_NAME }}.sln + dotnet build --configuration Release + env: + DOTNET_CLI_TELEMETRY_OUTPUT: true + + - name: Upload artifact + uses: actions/upload-artifact@v2.2.1 + with: + name: ${{env.PROJECT_NAME}} + path: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}} + if-no-files-found: error + + release: + needs: build + runs-on: windows-latest + + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + id: download + with: + name: ${{env.PROJECT_NAME}} + + - name: Create release + uses: softprops/action-gh-release@v1 + with: + files: ./latest.zip + + - name: Trigger plugin repo update + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.PAT }} + repository: ${{env.PLUGIN_REPO}} + event-type: new-release \ No newline at end of file