From 20e1be815323c1be678b87d79f18e4606a38193a Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:53:17 +0930 Subject: [PATCH 01/13] Migrate from pages-action to wrangler-action. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7f560b..759141a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,11 +120,11 @@ jobs: mv furble-*.bin deploy/firmware - name: Publish - uses: cloudflare/pages-action@1 + uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: furble-web-installer - directory: deploy + workingDirectory: deploy gitHubToken: ${{ secrets.GITHUB_TOKEN }} - branch: main + branch: ${{ github.event.release.prerelease && github.ref_name || 'main' }} From 60289f1bd01d50d313c20f286dea2ac6fc4481f0 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:57:24 +0930 Subject: [PATCH 02/13] Clarify step dependencies. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 759141a..3ccbc4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,7 @@ jobs: sha256sum.txt deploy: - needs: build + needs: release runs-on: ubuntu-latest permissions: contents: read From 1eafe852153ff003e6ea57766e31f894cdcca0d7 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:05:43 +0930 Subject: [PATCH 03/13] Try again. --- .github/workflows/release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ccbc4e..1afca81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,7 +124,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: furble-web-installer - workingDirectory: deploy - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.event.release.prerelease && github.ref_name || 'main' }} + command: pages deploy deploy --project-name=furble-web-installer From ce6febf33daf6da285a93b7b24417c7bf09538a9 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:11:18 +0930 Subject: [PATCH 04/13] Add branch control back in. --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1afca81..0f5ab6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,8 @@ jobs: release: needs: build runs-on: ubuntu-latest + name: Generate release artifacts + steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -124,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer + command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease && github.ref_name || 'main' }} From 6ebfb1fdd04640c9096d915b38f8ad709272b74d Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:28:17 +0930 Subject: [PATCH 05/13] Reverse the crazy truthyness. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f5ab6c..209248f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease && github.ref_name || 'main' }} + command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease == false && 'main' || github.ref_name }} From 7e26506f3aa942c9cb25cd72b88713a2d9e938c2 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:35:19 +0930 Subject: [PATCH 06/13] Why is this so silly? --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 209248f..da2f1ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease == false && 'main' || github.ref_name }} + command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease && 'HEAD' || 'main' }} From 66707cbcf6e65907e194ced86f04e54298f6413b Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:09:41 +0930 Subject: [PATCH 07/13] Add some debug. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da2f1ed..18485b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --branch=${{ github.event.release.prerelease && 'HEAD' || 'main' }} + command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From c51bf274ce7ee5f1499ded5933b0fbf514433ac4 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:21:36 +0930 Subject: [PATCH 08/13] More debug --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18485b8..af488ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease == true }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From 330ab59c1c5d334b99f26970080f0da2d39804a3 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:28:05 +0930 Subject: [PATCH 09/13] Again. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af488ce..b671040 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,4 +126,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease == true }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease == 'true' }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From dfbd36e5fe24a2648441f87c44445f7546463fbf Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:40:12 +0930 Subject: [PATCH 10/13] Try different trigger. --- .github/workflows/release.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b671040..9b5c798 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,8 @@ name: Release furble on: - push: - tags: - - 'v*' + release: + types: [published] env: FURBLE_VERSION: ${{ github.ref_name }}+${{ github.run_attempt }} @@ -89,9 +88,8 @@ jobs: sha256sum furble-*.bin > sha256sum.txt - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: - generate_release_notes: true files: | furble-*.bin manifest_*.json @@ -126,4 +124,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease == 'true' }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From 434cfcb5ec73f57bb3be5578a401c8ab0a2d2559 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:46:46 +0930 Subject: [PATCH 11/13] One more try. --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b5c798..dff5585 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,10 +23,10 @@ jobs: contents: write env: - FIRMWARE_NAME: furble-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin - BOOTLOADER_NAME: furble-bootloader-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin - PARTITIONS_NAME: furble-partitions-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin - BOOT_APP0_NAME: furble-boot-app0-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin + FIRMWARE_NAME: furble-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin + BOOTLOADER_NAME: furble-bootloader-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin + PARTITIONS_NAME: furble-partitions-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin + BOOT_APP0_NAME: furble-boot-app0-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin steps: - uses: actions/checkout@v4 @@ -124,4 +124,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From 89471b4a06fba21c6e49755045056eea064b73fc Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:48:57 +0930 Subject: [PATCH 12/13] Revert "One more try." This reverts commit 434cfcb5ec73f57bb3be5578a401c8ab0a2d2559. --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dff5585..9b5c798 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,10 +23,10 @@ jobs: contents: write env: - FIRMWARE_NAME: furble-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin - BOOTLOADER_NAME: furble-bootloader-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin - PARTITIONS_NAME: furble-partitions-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin - BOOT_APP0_NAME: furble-boot-app0-${{ matrix.platform }}-${{ env.FURBLE_VERSION }}.bin + FIRMWARE_NAME: furble-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin + BOOTLOADER_NAME: furble-bootloader-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin + PARTITIONS_NAME: furble-partitions-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin + BOOT_APP0_NAME: furble-boot-app0-${{ matrix.platform }}-${{ github.ref_name }}+${{ github.run_attempt }}.bin steps: - uses: actions/checkout@v4 @@ -124,4 +124,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} From d492f7bcb742d47fb9cfc6fccb22d68e0f1f1910 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:49:12 +0930 Subject: [PATCH 13/13] Revert and fix. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b5c798..33edc1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,4 +124,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy deploy --project-name=furble-web-installer --event=${{ github.event.release.prerelease }} --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }} + command: pages deploy deploy --project-name=furble-web-installer --branch=${{ !github.event.release.prerelease && 'main' || 'HEAD' }}