Generate Installable Plugin and Upload as Release Asset #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 : | | |
zip src/wp-content/plugins/cp-pepper | |
ls | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cp-pepper | |
path: cp-pepper.zip | |
- name: Upload to release | |
uses: JasonEtco/upload-to-release@master | |
with: | |
args: cp-pepper.zip application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |