Skip to content

Commit afd9a22

Browse files
committed
Commit the plugin as a zip
1 parent aba21d5 commit afd9a22

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/upload-artifact.yml

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
name: Deploy the plugin as the artifact
1+
name: Generate and Commit Plugin as a Zip file
22

33
on:
44
push:
5-
branches: ["main"]
6-
7-
workflow_dispatch:
5+
branches:
6+
- commit-latest-zip
87

98
jobs:
109
build:
1110
runs-on: ubuntu-latest
11+
1212
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v4
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.ref }}
17+
18+
- name: Zip the repository
19+
run: |
20+
zip -r latest.zip . -x ".gitignore" ".github"
1521
16-
- name: Upload artifact
17-
uses: actions/upload-artifact@v4
18-
with:
19-
name: staging2live-latest
20-
path: |
21-
*
22-
!.gitignore
23-
!.github
22+
- name: Commit latest.zip
23+
run: |
24+
git config user.name "GitHub Actions Bot"
25+
git config user.email "<>"
26+
git add latest.zip
27+
git commit -m "Update latest.zip" || echo "No changes to commit"
28+
git push origin ${{ github.ref }}

0 commit comments

Comments
 (0)