-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.03 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Generate Installable Plugin and Upload as Release Asset
on:
release:
types: [published]
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
src/wp-content/plugins/cp-pepper
repository: 'ClassicPress/ClassicPress'
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Create artifact
run : |
cd src/wp-content/plugins/
zip -r cp-pepper.zip cp-pepper
ls
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cp-pepper
path: src/wp-content/plugins/cp-pepper.zip
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: src/wp-content/plugins/cp-pepper.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}