Skip to content

Commit f6efbf6

Browse files
authored
Build .0-dev release at code freeze time (#60001)
* Build -dev release at code freeze time * Address feedback
1 parent ede7161 commit f6efbf6

1 file changed

Lines changed: 27 additions & 7 deletions

File tree

‎.github/workflows/release-code-freeze.yml‎

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,39 @@ jobs:
153153
branch: trunk
154154
bump-type: dev
155155

156-
build-zip:
157-
name: Build WooCommerce release ZIP
156+
build-dev-release:
157+
name: 'Build WooCommerce -dev release'
158158
uses: ./.github/workflows/release-build-zip-file.yml
159159
needs: [prepare-for-code-freeze, run-code-freeze]
160160
with:
161161
skip_verify: true
162-
create_github_release: false
162+
create_github_release: true
163163
branch: ${{ needs.prepare-for-code-freeze.outputs.nextReleaseBranch }}
164164

165+
publish-dev-release:
166+
name: 'Publish -dev release'
167+
runs-on: ${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }}
168+
needs: [prepare-for-code-freeze, build-dev-release]
169+
outputs:
170+
release-zip: ${{ steps.publish-release.outputs.release-zip }}
171+
steps:
172+
- id: publish-release
173+
env:
174+
GH_TOKEN: ${{ github.token }}
175+
GH_REPO: ${{ github.repository }}
176+
run: |
177+
gh release edit '${{ needs.prepare-for-code-freeze.outputs.nextReleaseVersion }}-dev' \
178+
--prerelease \
179+
--latest=false \
180+
--notes='' \
181+
--draft=false
182+
183+
echo "release-zip=https://github.com/${{ github.repository }}/releases/download/${{ needs.prepare-for-code-freeze.outputs.nextReleaseVersion }}-dev/woocommerce.zip" >> $GITHUB_OUTPUT
184+
165185
notify-slack:
166186
name: Notify Slack
167187
runs-on: ${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }}
168-
needs: [build-zip, prepare-for-code-freeze]
188+
needs: [publish-dev-release, prepare-for-code-freeze]
169189
steps:
170190
- name: Notify Slack on success
171191
uses: archive/github-actions-slack@f530f3aa696b2eef0e5aba82450e387bd7723903 #v2.0.0
@@ -175,14 +195,14 @@ jobs:
175195
slack-text: |
176196
:ice_cube: Code Freeze completed for `${{ needs.prepare-for-code-freeze.outputs.nextReleaseBranch }}` :checking:
177197
If you need a fix or change to be included in this release, please request a backport following the <https://developer.woocommerce.com/docs/contribution/releases/backporting|Backporting Guide>.
178-
<${{ needs.build-zip.outputs.artifact_url }}|Download zip>
198+
<${{ needs.publish-dev-release.outputs.release-zip }}|Download zip>
179199
slack-optional-unfurl_links: false
180200
slack-optional-unfurl_media: false
181201

182202
trigger-webhook:
183203
name: Trigger Release Webhook
184204
runs-on: ${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }}
185-
needs: [build-zip, prepare-for-code-freeze]
205+
needs: [publish-dev-release, prepare-for-code-freeze]
186206
steps:
187207
- name: Trigger Code Freeze Webhook
188208
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
@@ -193,7 +213,7 @@ jobs:
193213
const payload = {
194214
action: 'feature-freeze',
195215
version: '${{ needs.prepare-for-code-freeze.outputs.nextReleaseVersion }}',
196-
build_zip: '${{ needs.build-zip.outputs.artifact_url }}',
216+
build_zip: '${{ needs.publish-dev-release.outputs.release-zip }}',
197217
post_status: process.env.ENVIRONMENT === 'production' ? 'publish' : 'draft'
198218
};
199219

0 commit comments

Comments
 (0)