File tree Expand file tree Collapse file tree 4 files changed +31
-144
lines changed
Expand file tree Collapse file tree 4 files changed +31
-144
lines changed Original file line number Diff line number Diff line change 1- name : ' WordPress Plugin Deploy'
2- description : ' Deploy to the WordPress Plugin Repository'
3- author : ' 10up'
1+ name : ' Plugin Deploy'
2+ description : ' Upload zip file to releases tab'
43branding :
54 icon : ' upload-cloud'
65 color : ' blue'
7- inputs :
8- generate-zip :
9- description : ' Generate package zip file?'
10- default : false
6+
117outputs :
128 zip-path :
139 description : ' Path to zip file'
14- value : ${{ steps.deploy.outputs.zip-path }}
10+ value : ${{ steps.zip.outputs.zip-path }}
11+
1512runs :
1613 using : ' composite'
1714 steps :
18- - id : deploy
19- env :
20- INPUT_GENERATE_ZIP : ${{ inputs.generate-zip }}
21- run : ${{ github.action_path }}/deploy.sh
15+ - id : prepare
16+ name : Prepare Environment
17+ run : |
18+ sudo apt-get update && sudo apt-get install zip rsync -y
19+ - id : zip
20+ name : Zip Plugin (optional)
21+ run : |
22+ # Create dist folder and copy files while excluding .distignore items
23+ mkdir -p dist
24+ rsync -av --exclude-from="${{ env.PLUGIN_DIR }}/.distignore" ${{ env.PLUGIN_DIR }}/ dist/${{ env.SLUG }}
25+
26+ # Zip the plugin directory
27+ zip_file="faustwp-${{ env.VERSION }}.zip"
28+ zip -r $zip_file dist/${{ env.SLUG }}
29+
30+ # Save zip path to output
31+ echo "::set-output name=zip-path::$PWD/$zip_file"
2232 shell : bash
33+
34+ - id : upload
35+ name : Upload Zip File to Release
36+ uses : softprops/action-gh-release@v2
37+ with :
38+ repo_token : ${{ secrets.GITHUB_TOKEN }}
39+ files : ${{ steps.zip.outputs.zip-path }} # Updated to use zip-path output
40+ asset_name : faustwp-${{ env.VERSION }}.zip # Set asset name to the correct versioned name
41+ overwrite : true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5252 # Then deploy the WordPress plugin
5353 # https://github.com/changesets/action#outputs
5454 if : steps.changesets.outputs.published && contains(steps.changesets.outputs.publishedPackages, '"@faustwp/wordpress-plugin"')
55- # Use a variant of 10up/action-wordpress-plugin-deploy that allows us to specify a PLUGIN_DIR
56- # to support our monorepo structure.
5755 uses : ./.github/actions/release-plugin
5856 env :
59- SVN_PASSWORD : ${{ secrets.SVN_PASSWORD }}
60- SVN_USERNAME : ${{ secrets.SVN_USERNAME }}
6157 PLUGIN_DIR : plugins/faustwp
6258 SLUG : faustwp
6359 VERSION : ${{ env.PLUGIN_VERSION }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments