@@ -4,43 +4,44 @@ branding:
44 icon : ' upload-cloud'
55 color : ' blue'
66
7+ inputs :
8+ github_token :
9+ description : ' GitHub Token'
10+ required : true
11+
712outputs :
813 zip-path :
914 description : ' Path to zip file'
10- value : ${{ steps.zip.outputs.zip-path }}
15+ value : ${{ steps.zip-main-release-for-github .outputs.zip-path }}
1116 org-zip-path :
1217 description : ' Path to .org zip file'
13- value : ${{ steps.zip-org.outputs.zip-path }}
18+ value : ${{ steps.zip-org-release-for-github .outputs.zip-path }}
1419
1520runs :
1621 using : ' composite'
1722 steps :
1823 - id : prepare
1924 name : Prepare Environment
20- run : |
21- sudo apt-get update && sudo apt-get install zip rsync -y
25+ run : sudo apt-get update && sudo apt-get install zip rsync -y
2226 shell : bash
2327
2428 - id : zip-main-release-for-github
2529 name : Zip plugin for the main release
2630 run : |
27- # Create dist folder and copy files while excluding .distignore items
2831 mkdir -p dist
2932 rsync -av --exclude-from="${{ env.PLUGIN_DIR }}/.distignore" ${{ env.PLUGIN_DIR }}/ dist/${{ env.SLUG }}
3033
3134 zip_file="faustwp-${{ env.VERSION }}.zip"
3235 zip -r "$zip_file" "dist/${{ env.SLUG }}"
3336
34- # Save zip path to output
35- echo "::set-output name=zip-path::$PWD/$zip_file"
37+ echo "zip-path=$PWD/$zip_file" >> $GITHUB_ENV
3638 shell : bash
3739
3840 - id : zip-org-release-for-github
3941 name : Zip plugin for the non wpe-updater release
4042 run : |
4143 # Delete old directory
4244 rm -rf dist
43-
4445 # Create dist folder and copy files while excluding .distignore items
4546 mkdir -p dist
4647 # Copy plugin files to dist folder and exclude external updater
@@ -54,23 +55,23 @@ runs:
5455 zip -r "$org_zip_file" "dist/${{ env.SLUG }}"
5556
5657 # Save zip path to output
57- echo "::set-output name= zip-path:: $PWD/$org_zip_file"
58+ echo "org- zip-path= $PWD/$org_zip_file" >> $GITHUB_ENV
5859 shell : bash
5960
6061 - id : upload-main-release-to-github
6162 name : Uploads the main release zip file to GitHub
6263 uses : softprops/action-gh-release@v2
6364 with :
64- token : ${{ secrets.GITHUB_TOKEN }}
65- files : ${{ steps.zip.outputs .zip-path }}
65+ token : ${{ inputs.github_token }}
66+ files : ${{ env .zip-path }}
6667 asset_name : faustwp-${{ env.VERSION }}.zip
6768 overwrite : true
6869
6970 - id : upload-org-release-to-github
7071 name : Uploads the non wpe-updater release zip file to GitHub
7172 uses : softprops/action-gh-release@v2
7273 with :
73- token : ${{ secrets.GITHUB_TOKEN }}
74- files : ${{ steps.zip- org.outputs. zip-path }}
74+ token : ${{ inputs.github_token }}
75+ files : ${{ env. org- zip-path }}
7576 asset_name : faustwp-${{ env.VERSION }}.org.zip
7677 overwrite : true
0 commit comments