ci: gate production deploys and release publishing behind approval environments (#58898)

This commit is contained in:
Dax
2026-10-25 01:57:05 -04:00
committed by GitHub
Unverified
parent 8fd2ec1b72
commit 32b57015e5
6 changed files with 8 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ jobs:
deploy:
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: ${{ github.ref_name == 'production' && 'production' || '' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+1
View File
@@ -21,6 +21,7 @@ jobs:
deploy:
if: github.repository == 'anomalyco/opencode' && github.ref_name == 'production'
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: production
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+1
View File
@@ -17,6 +17,7 @@ jobs:
deploy:
if: github.repository == 'anomalyco/opencode' && github.ref_name == 'production'
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: production
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+1
View File
@@ -18,6 +18,7 @@ jobs:
deploy:
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: ${{ github.ref_name == 'production' && 'production' || '' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+1
View File
@@ -14,6 +14,7 @@ permissions:
jobs:
publish:
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: release
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
+3
View File
@@ -547,6 +547,8 @@ jobs:
- build-electron
if: always() && !failure() && !cancelled()
runs-on: blacksmith-4vcpu-ubuntu-2404
# Versioned and beta releases wait for approval in the release environment; dev previews do not.
environment: ${{ needs.version.outputs.release && 'release' || '' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
@@ -663,6 +665,7 @@ jobs:
- publish
if: ${{ !cancelled() && github.repository == 'anomalyco/opencode' && github.ref_name == 'dev' && needs.version.outputs.release && needs.publish.result == 'success' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: release
steps:
# Unlike dev, V2 publishes a tag rather than a GitHub Release event.
- name: Announce V2 release in Discord