From e635f0dbfbf2119c27334f2497928c64aaa7e679 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 21:18:43 -0600 Subject: [PATCH 1/7] Testing SG upload workflow --- .github/workflows/main.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eef86f9..a092941 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,8 @@ name: Build DLL -on: push +on: + push: + release: + types: [published] jobs: build_dll: strategy: @@ -69,3 +72,27 @@ jobs: ${{ env.DEPS_DIR }}/bin/*.pdb ${{ github.workspace }}/build/Release/lzip.pdb ${{ github.workspace }}/build/Release/lcurl.pdb + + - name: Upload to release + if: ${{ github.event_name }} == 'release' + run: | + tar -cvf SimpleGraphic-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll + gh release upload ${{ github.event.release.tag_name }} SimpleGraphicDLLs-${{ matrix.triplet }}.tar + + - name: Notify PathOfBuilding repo + if: ${{ github.event_name }} == 'release' + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.WIRES77_PAT }} + repository: ${{ github.repository.owner }}/PathOfBuilding + event-type: update-simple-graphic + client-payload: '{"tag": "${{ github.event.release.tag_name }}", "release_link": "${{ github.event.release.html_url }}"}' + + - name: Notify PathOfBuilding-PoE2 repo + if: ${{ github.event_name }} == 'release' + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.WIRES77_PAT }} + repository: ${{ github.repository.owner }}/PathOfBuilding-PoE2 + event-type: update-simple-graphic + client-payload: '{"tag": "${{ github.event.release.tag_name }}", "release_link": "${{ github.event.release.html_url }}"}' From 1021618bab871c585b4fc4111c26e0f1ed3cd154 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 22:23:44 -0600 Subject: [PATCH 2/7] Add token --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a092941..cb03790 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ jobs: VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed/ DEPS_DIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.triplet }} INST_DIR: ${{ github.workspace }}/install-prefix + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout uses: actions/checkout@v4 @@ -76,7 +77,7 @@ jobs: - name: Upload to release if: ${{ github.event_name }} == 'release' run: | - tar -cvf SimpleGraphic-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll + tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll gh release upload ${{ github.event.release.tag_name }} SimpleGraphicDLLs-${{ matrix.triplet }}.tar - name: Notify PathOfBuilding repo From 1e6c39a5b3fba57e6618d2879dd493cee2070554 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 22:34:42 -0600 Subject: [PATCH 3/7] Fix release ifs --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb03790..df7df61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,13 +75,13 @@ jobs: ${{ github.workspace }}/build/Release/lcurl.pdb - name: Upload to release - if: ${{ github.event_name }} == 'release' + if: ${{ github.event_name == 'release' }} run: | tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll gh release upload ${{ github.event.release.tag_name }} SimpleGraphicDLLs-${{ matrix.triplet }}.tar - name: Notify PathOfBuilding repo - if: ${{ github.event_name }} == 'release' + if: ${{ github.event_name == 'release' }} uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.WIRES77_PAT }} @@ -90,7 +90,7 @@ jobs: client-payload: '{"tag": "${{ github.event.release.tag_name }}", "release_link": "${{ github.event.release.html_url }}"}' - name: Notify PathOfBuilding-PoE2 repo - if: ${{ github.event_name }} == 'release' + if: ${{ github.event_name == 'release' }} uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.WIRES77_PAT }} From 9f4661d8b0fc1b5a7f65663e175b9829f8b19c0f Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 22:42:13 -0600 Subject: [PATCH 4/7] Fix repo owner --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df7df61..7602eee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -85,7 +85,7 @@ jobs: uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.WIRES77_PAT }} - repository: ${{ github.repository.owner }}/PathOfBuilding + repository: ${{ github.repository_owner }}/PathOfBuilding event-type: update-simple-graphic client-payload: '{"tag": "${{ github.event.release.tag_name }}", "release_link": "${{ github.event.release.html_url }}"}' @@ -94,6 +94,6 @@ jobs: uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.WIRES77_PAT }} - repository: ${{ github.repository.owner }}/PathOfBuilding-PoE2 + repository: ${{ github.repository_owner }}/PathOfBuilding-PoE2 event-type: update-simple-graphic client-payload: '{"tag": "${{ github.event.release.tag_name }}", "release_link": "${{ github.event.release.html_url }}"}' From 3f6a546e013aedde99e761beb790d8725d92c312 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 23:06:21 -0600 Subject: [PATCH 5/7] Fix directories in tarfile --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7602eee..cc4a681 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,7 @@ jobs: - name: Upload to release if: ${{ github.event_name == 'release' }} run: | - tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll + tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll -C ${{ env.INST_DIR }} . gh release upload ${{ github.event.release.tag_name }} SimpleGraphicDLLs-${{ matrix.triplet }}.tar - name: Notify PathOfBuilding repo From 79b040f4cb34fb70cd106976236cbb23c2da0c4c Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 19 Jan 2025 23:21:05 -0600 Subject: [PATCH 6/7] Fix directories in tarfile --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc4a681..0d5c7c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,8 @@ jobs: - name: Upload to release if: ${{ github.event_name == 'release' }} run: | - tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar ${{ env.INST_DIR }}/*.dll -C ${{ env.INST_DIR }} . + cd ${{ env.INST_DIR }} + tar -cvf SimpleGraphicDLLs-${{ matrix.triplet }}.tar *.dll gh release upload ${{ github.event.release.tag_name }} SimpleGraphicDLLs-${{ matrix.triplet }}.tar - name: Notify PathOfBuilding repo From 0a82c84765285c2b761ad41710e9ac843e057312 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Tue, 21 Jan 2025 09:16:49 -0600 Subject: [PATCH 7/7] Save artifacts for PR testing --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d5c7c2..63e49a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: Build DLL on: push: + pull_request: release: types: [published] jobs: