Skip to content

Commit a6bedc2

Browse files
committed
Remove redundant prerelease job from release workflow
The publish-prerelease job created a race condition with publish-release when merging Version Packages PRs, causing both jobs to attempt publishing the same version simultaneously (409 Conflict from npm). PR previews already handle preview builds, making the prerelease job unnecessary.
1 parent 1558ec9 commit a6bedc2

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -71,81 +71,6 @@ jobs:
7171
- name: Run container unit tests
7272
run: npm run test -w @repo/sandbox-container
7373

74-
# Prerelease publish - always runs after tests pass
75-
publish-prerelease:
76-
needs: [unit-tests]
77-
if: ${{ github.repository_owner == 'cloudflare' }}
78-
runs-on: ubuntu-latest
79-
timeout-minutes: 30
80-
permissions:
81-
contents: read
82-
83-
steps:
84-
- uses: actions/checkout@v4
85-
86-
- uses: actions/setup-node@v4
87-
with:
88-
node-version: 24
89-
cache: 'npm'
90-
91-
- uses: oven-sh/setup-bun@v2
92-
with:
93-
bun-version: latest
94-
95-
- name: Install dependencies
96-
run: npm ci
97-
98-
- name: Build packages
99-
run: npm run build
100-
101-
- name: Modify package.json version
102-
run: npx tsx .github/version-script.ts
103-
104-
- name: Resolve workspace dependencies
105-
run: npx tsx .github/resolve-workspace-versions.ts
106-
107-
- name: Set up Docker Buildx
108-
uses: docker/setup-buildx-action@v3
109-
110-
- name: Login to Docker Hub
111-
uses: docker/login-action@v3
112-
with:
113-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
114-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
115-
116-
- name: Build and cache single-arch image (for PR cache reuse)
117-
uses: docker/build-push-action@v6
118-
with:
119-
context: .
120-
file: packages/sandbox/Dockerfile
121-
platforms: linux/amd64
122-
push: false # Don't push, just cache
123-
cache-from: type=gha,scope=release-amd64
124-
cache-to: type=gha,mode=max,scope=release-amd64
125-
build-args: |
126-
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}
127-
128-
- name: Build and push Docker image (beta)
129-
uses: docker/build-push-action@v6
130-
with:
131-
context: .
132-
file: packages/sandbox/Dockerfile
133-
platforms: linux/amd64,linux/arm64
134-
push: true
135-
tags: cloudflare/sandbox:${{ needs.unit-tests.outputs.version }}-beta
136-
cache-from: |
137-
type=gha,scope=release-amd64
138-
type=gha,scope=release
139-
cache-to: type=gha,mode=max,scope=release
140-
build-args: |
141-
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}
142-
143-
- name: Publish to npm with beta tag
144-
run: npm publish --tag beta --access public
145-
env:
146-
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
147-
working-directory: packages/sandbox
148-
14974
# Release publish - only runs if changesets exist
15075
publish-release:
15176
needs: [unit-tests]

0 commit comments

Comments
 (0)