Update code freeze GH Actions workflow to upload the woocommerce packages to the R2 bucket on code freeze. (#45393)

* Update code freeze GH Actions workflow to upload the woocommerce packages to the R2 bucket on code freeze.

* Make the job that uploads WooCommerce release packages to the R2 bucket independent from the Slack integration in release-code-freeze.yml workflow.
This commit is contained in:
Alejandro López Ariza 2024-03-15 08:38:47 +01:00 committed by GitHub
parent 4be06d8959
commit 1a8ec1c0c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 52 additions and 0 deletions

View File

@ -233,6 +233,32 @@ jobs:
path: plugins/woocommerce/woocommerce.zip
retention-days: 2
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/
slack-upload-monthly:
name: Upload Beta to Slack
runs-on: ubuntu-20.04
@ -278,6 +304,32 @@ jobs:
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"
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/
slack-upload-accelerated:
name: Upload Accelerated to Slack
runs-on: ubuntu-20.04