2022-12-01 08:36:26 +00:00
|
|
|
name: 'Release: Code freeze'
|
2024-02-22 16:52:11 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 4' # Run at start of day UTC on Thursday. i.e. ~Wednesday EOD 23:59:59 UTC
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
timeOverride:
|
|
|
|
description: "Time Override: The time to use in checking whether the action should run (default: 'now')."
|
|
|
|
default: 'now'
|
|
|
|
skipSlackPing:
|
|
|
|
description: 'Skip Slack Ping: If true, the Slack ping will be skipped (useful for testing)'
|
|
|
|
type: boolean
|
|
|
|
slackChannelOverride:
|
|
|
|
description: 'Slack Channel Override: The channel ID to send the Slack ping about the freeze'
|
2022-06-16 19:44:07 +00:00
|
|
|
|
|
|
|
env:
|
2023-04-19 19:07:54 +00:00
|
|
|
TIME_OVERRIDE: ${{ inputs.timeOverride || 'now' }}
|
2022-10-13 18:23:03 +00:00
|
|
|
GIT_COMMITTER_NAME: 'WooCommerce Bot'
|
2024-04-19 21:11:01 +00:00
|
|
|
GIT_COMMITTER_EMAIL: 'no-reply@woocommerce.com'
|
2022-10-13 18:23:03 +00:00
|
|
|
GIT_AUTHOR_NAME: 'WooCommerce Bot'
|
2024-04-19 21:11:01 +00:00
|
|
|
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
|
2022-02-09 19:43:05 +00:00
|
|
|
|
2023-01-02 17:28:11 +00:00
|
|
|
permissions: {}
|
|
|
|
|
2022-02-09 19:43:05 +00:00
|
|
|
jobs:
|
2023-04-26 21:02:32 +00:00
|
|
|
code-freeze-prep:
|
|
|
|
name: 'Verify that today is the day of the code freeze and prepare repository'
|
2022-12-01 08:36:26 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-04-26 21:02:32 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
issues: write
|
2023-05-03 21:12:20 +00:00
|
|
|
pull-requests: write
|
2022-12-01 08:36:26 +00:00
|
|
|
outputs:
|
2023-11-13 21:24:21 +00:00
|
|
|
isTodayAcceleratedFreeze: ${{ steps.get-versions.outputs.isTodayAcceleratedFreeze }}
|
|
|
|
isTodayMonthlyFreeze: ${{ steps.get-versions.outputs.isTodayMonthlyFreeze }}
|
|
|
|
acceleratedVersion: ${{ steps.get-versions.outputs.acceleratedVersion }}
|
|
|
|
monthlyVersion: ${{ steps.get-versions.outputs.monthlyVersion }}
|
|
|
|
monthlyVersionXY: ${{ steps.get-versions.outputs.monthlyVersionXY }}
|
|
|
|
releasesFrozenToday: ${{ steps.get-versions.outputs.releasesFrozenToday }}
|
|
|
|
acceleratedBranch: ${{ steps.get-versions.outputs.acceleratedBranch }}
|
|
|
|
monthlyBranch: ${{ steps.get-versions.outputs.monthlyBranch }}
|
|
|
|
monthlyMilestone: ${{ steps.get-versions.outputs.monthlyMilestone }}
|
2022-12-01 08:36:26 +00:00
|
|
|
steps:
|
2023-04-12 21:28:53 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2022-12-01 08:36:26 +00:00
|
|
|
with:
|
2023-04-12 21:28:53 +00:00
|
|
|
fetch-depth: 0
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-05-22 21:15:46 +00:00
|
|
|
- name: Setup PNPM
|
2024-08-07 07:04:24 +00:00
|
|
|
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
|
2023-05-22 21:15:46 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
|
|
with:
|
|
|
|
node-version-file: .nvmrc
|
|
|
|
cache: pnpm
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
|
2023-04-12 21:28:53 +00:00
|
|
|
- name: Install prerequisites
|
2022-12-01 08:36:26 +00:00
|
|
|
run: |
|
2023-05-22 21:15:46 +00:00
|
|
|
pnpm install --filter monorepo-utils --ignore-scripts
|
|
|
|
# ignore scripts speeds up setup signficantly, but we still need to build monorepo utils
|
|
|
|
pnpm build
|
|
|
|
working-directory: tools/monorepo-utils
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-11-13 21:24:21 +00:00
|
|
|
- name: 'Get the versions for the accelerated and monthly releases'
|
|
|
|
id: get-versions
|
|
|
|
run: pnpm utils code-freeze get-version -o $TIME_OVERRIDE
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-11-13 21:24:21 +00:00
|
|
|
- name: Create next monthly milestone
|
2023-04-26 21:02:32 +00:00
|
|
|
id: milestone
|
2023-11-13 21:24:21 +00:00
|
|
|
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
|
2023-04-26 21:02:32 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze milestone -o ${{ github.repository_owner }} -m ${{ steps.get-versions.outputs.monthlyMilestone }}
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-11-13 21:24:21 +00:00
|
|
|
- name: Create next monthly release branch
|
2023-04-26 21:02:32 +00:00
|
|
|
id: branch
|
2023-11-13 21:24:21 +00:00
|
|
|
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
|
2022-12-01 08:36:26 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }}
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Create next accelerated release branch
|
|
|
|
id: branch-accel
|
|
|
|
if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }}
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Bump versions for Beta.1 monthly release
|
|
|
|
id: version-bump
|
|
|
|
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} -c ${{ steps.get-versions.outputs.monthlyVersion }}-beta.1
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Bump versions for accelerated release
|
|
|
|
id: version-bump-accel
|
|
|
|
if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} -af
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Prep accelerated release
|
|
|
|
id: accel-release-prep
|
|
|
|
if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: pnpm utils code-freeze accelerated-prep -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} ${{ steps.get-versions.outputs.acceleratedReleaseDate }}
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-05-03 21:12:20 +00:00
|
|
|
- name: Prepare trunk for next development cycle
|
|
|
|
id: prep-trunk
|
2023-11-13 21:24:21 +00:00
|
|
|
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
|
2023-05-03 21:12:20 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze version-bump ${{ steps.get-versions.outputs.monthlyMilestone }}-dev -o ${{ github.repository_owner }}
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-05-17 22:41:46 +00:00
|
|
|
- name: Generate changelog changes
|
|
|
|
id: changelog
|
2023-11-13 21:24:21 +00:00
|
|
|
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
|
2023-05-17 22:41:46 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-28 22:50:43 +00:00
|
|
|
run: pnpm utils code-freeze changelog -c -o ${{ github.repository_owner }} -v ${{ steps.get-versions.outputs.monthlyVersionXY }}
|
2023-11-13 21:24:21 +00:00
|
|
|
|
2023-05-17 22:41:46 +00:00
|
|
|
|
2022-12-01 08:36:26 +00:00
|
|
|
notify-slack:
|
|
|
|
name: 'Sends code freeze notification to Slack'
|
|
|
|
runs-on: ubuntu-20.04
|
2023-05-03 21:12:20 +00:00
|
|
|
needs: code-freeze-prep
|
2023-11-13 21:24:21 +00:00
|
|
|
if: ${{ inputs.skipSlackPing != true && ( needs.code-freeze-prep.outputs.isTodayAcceleratedFreeze == 'yes' || needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' ) }}
|
|
|
|
outputs:
|
|
|
|
ts: ${{ steps.notify.outputs.ts }}
|
2022-12-01 08:36:26 +00:00
|
|
|
steps:
|
2023-05-22 21:15:46 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2022-12-01 08:36:26 +00:00
|
|
|
with:
|
2023-05-22 21:15:46 +00:00
|
|
|
fetch-depth: 0
|
2022-12-01 08:36:26 +00:00
|
|
|
|
2023-05-22 21:15:46 +00:00
|
|
|
- name: Setup PNPM
|
2024-08-07 07:04:24 +00:00
|
|
|
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
|
2023-05-22 21:15:46 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
|
|
with:
|
|
|
|
node-version-file: .nvmrc
|
|
|
|
cache: pnpm
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
|
|
|
pnpm install --filter monorepo-utils --ignore-scripts
|
|
|
|
# ignore scripts speeds up setup signficantly, but we still need to build monorepo utils
|
|
|
|
pnpm build
|
|
|
|
working-directory: tools/monorepo-utils
|
|
|
|
|
|
|
|
- name: Slack
|
|
|
|
id: notify
|
|
|
|
run: |
|
|
|
|
pnpm utils slack "${{ secrets.CODE_FREEZE_BOT_TOKEN }}" "
|
2023-11-13 21:24:21 +00:00
|
|
|
:warning-8c: ${{ join( fromJSON( needs.code-freeze-prep.outputs.releasesFrozenToday ), ' and ' ) }} Code Freeze :ice_cube:
|
|
|
|
The freeze automation for ${{ join( fromJSON( needs.code-freeze-prep.outputs.releasesFrozenToday ), ' and ' ) }} has finished. ${{ ( needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' && 'If you need to request a code freeze exception, see the <' ) || '' }}${{ ( needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' && secrets.FG_LINK ) || '' }}${{ ( needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' && '/code-freeze-for-woocommerce-core-release/|fieldguide page for the code freeze>.' ) || '' }}
|
|
|
|
|
|
|
|
The build for ${{ join( fromJSON( needs.code-freeze-prep.outputs.releasesFrozenToday ), ' and ' ) }} will appear in this thread shortly... :thread:
|
2023-05-22 21:15:46 +00:00
|
|
|
" "${{ inputs.slackChannelOverride || secrets.WOO_RELEASE_SLACK_CHANNEL }}"
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
build-monthly:
|
|
|
|
name: Build beta zip file
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: code-freeze-prep
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' }}
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ needs.code-freeze-prep.outputs.monthlyBranch }}
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2024-07-10 12:39:49 +00:00
|
|
|
with:
|
|
|
|
pull-package-deps: '@woocommerce/plugin-woocommerce'
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Build zip
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: bash bin/build-zip.sh
|
|
|
|
|
|
|
|
- name: Upload the zip file as an artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1
|
|
|
|
path: plugins/woocommerce/woocommerce.zip
|
|
|
|
retention-days: 2
|
|
|
|
|
|
|
|
build-a:
|
|
|
|
name: Build accelerated zip file
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: code-freeze-prep
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayAcceleratedFreeze == 'yes' }}
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ needs.code-freeze-prep.outputs.acceleratedBranch }}
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2024-07-10 12:39:49 +00:00
|
|
|
with:
|
|
|
|
pull-package-deps: '@woocommerce/plugin-woocommerce'
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Build zip
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: bash bin/build-zip.sh
|
|
|
|
|
|
|
|
- name: Upload the zip file as an artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}
|
|
|
|
path: plugins/woocommerce/woocommerce.zip
|
|
|
|
retention-days: 2
|
2024-03-15 07:38:47 +00:00
|
|
|
|
|
|
|
r2-upload-monthly:
|
|
|
|
name: Upload Beta to R2
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, build-monthly ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' }}
|
|
|
|
steps:
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- run: ls -lah ${{steps.download.outputs.download-path}}
|
|
|
|
|
|
|
|
- name: Upload release zip to Cloudflare R2 bucket
|
|
|
|
uses: ryand56/r2-upload-action@de3eabc2e3137ce07bc3805af441df55f535c64b
|
|
|
|
with:
|
|
|
|
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
|
|
|
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
|
|
|
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
|
|
|
r2-bucket: ${{ secrets.R2_BUCKET }}
|
|
|
|
source-dir: ${{ steps.download.outputs.download-path }}
|
|
|
|
destination-dir: ./monthly/
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
slack-upload-monthly:
|
|
|
|
name: Upload Beta to Slack
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, notify-slack, build-monthly ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' && inputs.skipSlackPing != true }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup PNPM
|
2024-08-07 07:04:24 +00:00
|
|
|
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
|
|
with:
|
|
|
|
node-version-file: .nvmrc
|
|
|
|
cache: pnpm
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
|
|
|
pnpm install --filter monorepo-utils --ignore-scripts
|
|
|
|
# ignore scripts speeds up setup signficantly, but we still need to build monorepo utils
|
|
|
|
pnpm build
|
|
|
|
working-directory: tools/monorepo-utils
|
|
|
|
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- run: ls -lah ${{steps.download.outputs.download-path}}
|
|
|
|
|
|
|
|
- name: Send release zip to Slack
|
|
|
|
id: send-file-slack
|
|
|
|
run : |
|
|
|
|
pnpm utils slack file "${{ secrets.CODE_FREEZE_BOT_TOKEN }}" "Here's the generated release build for ${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1" "${{ steps.download.outputs.download-path }}/woocommerce.zip" "${{ inputs.slackChannelOverride || secrets.WOO_RELEASE_SLACK_CHANNEL }}" --reply-ts ${{ needs.notify-slack.outputs.ts }} --filename "woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1.zip"
|
|
|
|
|
2024-03-15 07:38:47 +00:00
|
|
|
r2-upload-accelerated:
|
|
|
|
name: Upload Accelerated to R2
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, build-a ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayAcceleratedFreeze == 'yes' }}
|
|
|
|
steps:
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- run: ls -lah ${{steps.download.outputs.download-path}}
|
|
|
|
|
|
|
|
- name: Upload release zip to Cloudflare R2 bucket
|
|
|
|
uses: ryand56/r2-upload-action@de3eabc2e3137ce07bc3805af441df55f535c64b
|
|
|
|
with:
|
|
|
|
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
|
|
|
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
|
|
|
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
|
|
|
r2-bucket: ${{ secrets.R2_BUCKET }}
|
|
|
|
source-dir: ${{ steps.download.outputs.download-path }}
|
|
|
|
destination-dir: ./accelerated/
|
|
|
|
|
2023-11-13 21:24:21 +00:00
|
|
|
slack-upload-accelerated:
|
|
|
|
name: Upload Accelerated to Slack
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, notify-slack, build-a ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayAcceleratedFreeze == 'yes' && inputs.skipSlackPing != true }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup PNPM
|
2024-08-07 07:04:24 +00:00
|
|
|
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
|
2023-11-13 21:24:21 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
|
|
with:
|
|
|
|
node-version-file: .nvmrc
|
|
|
|
cache: pnpm
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
|
|
|
pnpm install --filter monorepo-utils --ignore-scripts
|
|
|
|
# ignore scripts speeds up setup signficantly, but we still need to build monorepo utils
|
|
|
|
pnpm build
|
|
|
|
working-directory: tools/monorepo-utils
|
|
|
|
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- run: ls -lah ${{steps.download.outputs.download-path}}
|
|
|
|
|
|
|
|
- name: Send release zip to Slack
|
|
|
|
id: send-file-slack
|
|
|
|
run : |
|
|
|
|
pnpm utils slack file "${{ secrets.CODE_FREEZE_BOT_TOKEN }}" "Here's the generated release build for ${{ needs.code-freeze-prep.outputs.acceleratedVersion }}" "${{ steps.download.outputs.download-path }}/woocommerce.zip" "${{ inputs.slackChannelOverride || secrets.WOO_RELEASE_SLACK_CHANNEL }}" --reply-ts ${{ needs.notify-slack.outputs.ts }} --filename "woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}.zip"
|
|
|
|
|
|
|
|
github-upload-monthly:
|
|
|
|
name: Create single-zipped GitHub asset (Monthly)
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, build-monthly ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayMonthlyFreeze == 'yes' }}
|
|
|
|
steps:
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- name: Unzip the file (prevents double zip problem)
|
|
|
|
run: unzip ${{ steps.download.outputs.download-path }}/woocommerce.zip -d zipfile
|
|
|
|
|
|
|
|
- name: Upload the zip file as an artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: woocommerce.${{ needs.code-freeze-prep.outputs.monthlyVersion }}-beta.1
|
|
|
|
path: zipfile
|
|
|
|
retention-days: 10
|
|
|
|
|
|
|
|
github-upload-accelerated:
|
|
|
|
name: Create single-zipped GitHub asset (Accelerated)
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [ code-freeze-prep, build-a ]
|
|
|
|
if: ${{ needs.code-freeze-prep.outputs.isTodayAcceleratedFreeze == 'yes' }}
|
|
|
|
steps:
|
|
|
|
- id: download
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: double-zipped-woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}
|
|
|
|
path: download
|
|
|
|
|
|
|
|
- name: Unzip the file (prevents double zip problem)
|
|
|
|
run: unzip ${{ steps.download.outputs.download-path }}/woocommerce.zip -d zipfile
|
|
|
|
|
|
|
|
- name: Upload the zip file as an artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }}
|
|
|
|
path: zipfile
|
2023-12-18 21:39:45 +00:00
|
|
|
retention-days: 10
|