Sfoglia il codice sorgente

ci: prevent beta branch builds from triggering production release steps

Skip Windows and Linux code signing, along with artifact downloads for
the beta branch to ensure beta builds don't go through production
release processes.
Dax Raad 5 mesi fa
parent
commit
eac50f9151
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      .github/workflows/publish.yml

+ 4 - 3
.github/workflows/publish.yml

@@ -114,7 +114,7 @@ jobs:
       - build-cli
       - build-cli
       - version
       - version
     runs-on: blacksmith-4vcpu-windows-2025
     runs-on: blacksmith-4vcpu-windows-2025
-    if: github.repository == 'anomalyco/opencode'
+    if: github.repository == 'anomalyco/opencode' && github.ref_name != 'beta'
     env:
     env:
       AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
       AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
       AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
       AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
@@ -390,6 +390,7 @@ jobs:
     needs:
     needs:
       - build-cli
       - build-cli
       - version
       - version
+    if: github.repository == 'anomalyco/opencode' && github.ref_name != 'beta'
     continue-on-error: false
     continue-on-error: false
     env:
     env:
       AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
       AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
@@ -422,7 +423,6 @@ jobs:
             target: aarch64-unknown-linux-gnu
             target: aarch64-unknown-linux-gnu
             platform_flag: --linux
             platform_flag: --linux
     runs-on: ${{ matrix.settings.host }}
     runs-on: ${{ matrix.settings.host }}
-    # if: github.ref_name == 'beta'
     steps:
     steps:
       - uses: actions/checkout@v3
       - uses: actions/checkout@v3
 
 
@@ -591,12 +591,13 @@ jobs:
           path: packages/opencode/dist
           path: packages/opencode/dist
 
 
       - uses: actions/download-artifact@v4
       - uses: actions/download-artifact@v4
+        if: github.ref_name != 'beta'
         with:
         with:
           name: opencode-cli-signed-windows
           name: opencode-cli-signed-windows
           path: packages/opencode/dist
           path: packages/opencode/dist
 
 
       - uses: actions/download-artifact@v4
       - uses: actions/download-artifact@v4
-        if: needs.version.outputs.release
+        if: needs.version.outputs.release && github.ref_name != 'beta'
         with:
         with:
           pattern: latest-yml-*
           pattern: latest-yml-*
           path: /tmp/latest-yml
           path: /tmp/latest-yml