File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Build zip file on WooPay changes"
2+
3+ # This action will run on PRs and monitor changes in specific directories
4+ on :
5+ pull_request :
6+ paths :
7+ - ' client/checkout/woopay/**'
8+ - ' client/components/woopay/**'
9+ - ' includes/woopay/**'
10+ workflow_dispatch :
11+
12+ jobs :
13+ build-zip :
14+ name : " Build the zip file"
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : " Checkout repository"
18+ uses : actions/checkout@v4
19+ with :
20+ ref : ${{ github.head_ref }}
21+
22+ - name : " Set up repository"
23+ uses : ./.github/actions/setup-repo
24+
25+ - name : " Build the plugin"
26+ id : build_plugin
27+ uses : ./.github/actions/build
28+
29+ - name : " Upload the zip file as an artifact"
30+ id : upload_artifact
31+ uses : actions/upload-artifact@v4
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ with :
35+ name : " woocommerce-payments"
36+ path : release
37+ retention-days : 14
38+
39+ - name : " Echo artifact ID"
40+ run : |
41+ echo "Build artifact ID: ${{ steps.upload_artifact.outputs.artifact_id }}"
42+
43+ - name : " Post artifact ID as a PR comment"
44+ if : ${{ github.event_name == 'pull_request' }}
45+ run : |
46+ COMMENT=":package: Build artifact ID: ${{ steps.upload_artifact.outputs.artifact_id }}"
47+ gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT"
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+
You can’t perform that action at this time.
0 commit comments