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 - 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, body: ':package: Artifacts ready for [download](https://github.com/${{ github.repository_owner }}/${{ github.repository }}/actions/runs/${{ github.run_id }})!' })