2021-01-21 07:39:19 +00:00
|
|
|
name: Build zip for PR
|
|
|
|
on:
|
|
|
|
pull_request
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build zip for PR
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
|
|
id: build
|
|
|
|
uses: woocommerce/action-build@v2
|
|
|
|
- name: Upload PR zip
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
name: woocommerce.zip
|
|
|
|
path: ${{ steps.build.outputs.zip_path }}
|
|
|
|
retention-days: 7
|
2021-01-22 01:51:15 +00:00
|
|
|
- name: Add comment
|
|
|
|
uses: actions/github-script@v3
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
script: |
|
|
|
|
github.issues.createComment({
|
|
|
|
issue_number: context.issue.number,
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
2021-01-22 03:18:07 +00:00
|
|
|
body: ':package: Artifacts ready for [download](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!'
|
2021-01-22 01:51:15 +00:00
|
|
|
})
|