2020-04-27 23:09:29 +00:00
|
|
|
name: Build release asset
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
2023-01-02 17:28:11 +00:00
|
|
|
|
|
|
|
permissions: {}
|
|
|
|
|
2020-04-27 23:09:29 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build release asset
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-01-02 17:28:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2020-04-27 23:09:29 +00:00
|
|
|
steps:
|
2022-05-17 16:26:08 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-13 01:55:03 +00:00
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2022-05-02 23:48:20 +00:00
|
|
|
with:
|
2022-09-13 01:55:03 +00:00
|
|
|
build: false
|
2022-05-17 18:48:24 +00:00
|
|
|
|
2022-04-27 13:40:37 +00:00
|
|
|
- name: Build zip
|
2022-05-02 23:48:20 +00:00
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: bash bin/build-zip.sh
|
2022-04-27 13:40:37 +00:00
|
|
|
|
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
|
2022-10-20 00:52:03 +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
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
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 }}" }'
|