2020-04-27 23:09:29 +00:00
|
|
|
name: Build release asset
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build release asset
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-04-27 23:09:29 +00:00
|
|
|
steps:
|
2022-04-27 13:40:37 +00:00
|
|
|
- name: Checkout code.
|
2022-04-21 18:29:53 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-04-27 13:40:37 +00:00
|
|
|
|
|
|
|
- name: Install PNPM
|
2022-05-02 17:08:52 +00:00
|
|
|
run: npm install -g pnpm@^6.24.2
|
2022-04-27 13:40:37 +00:00
|
|
|
|
|
|
|
- name: Build zip
|
|
|
|
run: pnpm nx build-zip woocommerce
|
|
|
|
|
2020-04-27 23:09:29 +00:00
|
|
|
- name: Upload release asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
2022-04-27 13:40:37 +00:00
|
|
|
asset_path: plugins/woocommerce/woocommerce.zip
|
2020-04-28 14:52:16 +00:00
|
|
|
asset_name: woocommerce.zip
|
2020-04-27 23:09:29 +00:00
|
|
|
asset_content_type: application/zip
|
2021-03-13 02:17:27 +00:00
|
|
|
update-code-reference:
|
|
|
|
if: github.event.release.prerelease == false && github.event.release.draft == false && github.repository_owner == 'woocommerce'
|
|
|
|
name: Update Code Reference
|
|
|
|
needs: build
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-03-13 02:17:27 +00:00
|
|
|
steps:
|
|
|
|
- name: Invoke Code Reference build and deploy workflow
|
|
|
|
uses: aurelien-baudet/workflow-dispatch@v2
|
|
|
|
with:
|
|
|
|
workflow: GitHub Pages deploy
|
|
|
|
repo: woocommerce/code-reference
|
|
|
|
token: ${{ secrets.CUSTOM_GH_TOKEN }}
|
|
|
|
ref: refs/heads/trunk
|
|
|
|
inputs: '{ "version": "${{ github.event.release.tag_name }}" }'
|
2022-02-04 12:30:01 +00:00
|
|
|
run-release-smoke-tests:
|
|
|
|
name: Execute Smoke test release
|
|
|
|
needs: build
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2022-02-04 12:30:01 +00:00
|
|
|
steps:
|
|
|
|
- name: Invoke release smoke testing workflow
|
|
|
|
uses: aurelien-baudet/workflow-dispatch@v2
|
|
|
|
with:
|
|
|
|
workflow: Smoke test release
|
|
|
|
repo: ${{ github.repository }}
|
2022-02-04 14:45:36 +00:00
|
|
|
token: ${{ secrets.E2E_WORKFLOW_GH_TOKEN }}
|
2022-02-04 12:30:01 +00:00
|
|
|
ref: refs/heads/trunk
|
|
|
|
inputs: '{ "release_id": "${{ github.event.release.id }}" }'
|