1- name : Build and Distribute Package
1+ name : Build and Distribute SQLite Command Package
22
33on :
44 release :
@@ -18,33 +18,40 @@ jobs:
1818 - name : Install dependencies
1919 run : composer install --no-dev --optimize-autoloader
2020
21+ - name : Set release version
22+ id : set_version
23+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
24+
2125 - name : Create distribution
2226 run : |
23- mkdir dist
27+ mkdir temp_dist
2428 rsync -av \
2529 --exclude-from='.distignore' \
2630 --exclude='.git' \
2731 --exclude='.github' \
28- --exclude='dist ' \
29- . dist /
32+ --exclude='temp_dist ' \
33+ . temp_dist /
3034
3135 - name : Create ZIP archive
3236 run : |
33- cd dist
34- zip -r distribution.zip .
37+ cd temp_dist
38+ zip -r ../wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}.zip .
39+
40+ - name : Clean up
41+ run : rm -rf temp_dist
3542
3643 - name : Upload distribution as artifact
3744 uses : actions/upload-artifact@v2
3845 with :
39- name : distribution
40- path : distribution .zip
46+ name : wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}
47+ path : wp-cli-sqlite-command-${{ env.RELEASE_VERSION }} .zip
4148
4249 - name : Upload to release
4350 uses : actions/upload-release-asset@v1
4451 env :
4552 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4653 with :
4754 upload_url : ${{ github.event.release.upload_url }}
48- asset_path : ./distribution .zip
49- asset_name : distribution .zip
55+ asset_path : ./wp-cli-sqlite-command-${{ env.RELEASE_VERSION }} .zip
56+ asset_name : wp-cli-sqlite-command-${{ env.RELEASE_VERSION }} .zip
5057 asset_content_type : application/zip
0 commit comments