2020-04-27 23:09:29 +00:00
|
|
|
name: Build release asset
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build release asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
|
|
id: build
|
2020-08-25 16:41:24 +00:00
|
|
|
uses: woocommerce/action-build@v2
|
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 }}
|
|
|
|
asset_path: ${{ steps.build.outputs.zip_path }}
|
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
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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 }}" }'
|