@@ -2,61 +2,6 @@ name: Build
22on : [push, pull_request]
33
44jobs :
5- deploy :
6- name : build dependencies & create artifact
7- runs-on : ubuntu-latest
8- steps :
9- - name : Checkout
10- uses : actions/checkout@v2.0.0
11- - name : Install composer dependencies
12- run : composer install --no-dev -o
13- - name : Clean-up project
14- uses : PrestaShopCorp/github-action-clean-before-deploy@v1.0
15- - name : Prepare auto-index tool
16- run : |
17- composer global require prestashop/autoindex
18- - name : Generate index.php
19- run : |
20- ~/.composer/vendor/bin/autoindex
21- - name : Create & upload artifact
22- uses : actions/upload-artifact@v1
23- with :
24- name : ${{ github.event.repository.name }}
25- path : ../
26- update_release_draft :
27- runs-on : ubuntu-latest
28- needs : [deploy]
29- if : github.event_name == 'push' && github.event.ref == 'refs/heads/master'
30- steps :
31- - name : Download artifact
32- uses : actions/download-artifact@v1
33- with :
34- name : ${{ github.event.repository.name }}
35- - id : release_info
36- uses : toolmantim/release-drafter@v5
37- env :
38- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39- - name : Prepare for Release
40- run : |
41- cd ${{ github.event.repository.name }}
42- zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
43- - name : Clean existing assets
44- shell : bash
45- run : |
46- curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
47- assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'`
48- for asset in $assets
49- do
50- bin/hub api -X DELETE $asset
51- done
52- env :
53- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54- - name : Publish to GitHub Release
55- uses : actions/upload-release-asset@v1.0.1
56- env :
57- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58- with :
59- upload_url : ${{ steps.release_info.outputs.upload_url }}
60- asset_path : ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip
61- asset_name : ${{ github.event.repository.name }}.zip
62- asset_content_type : application/zip
5+ build-and-release-draft :
6+ name : Build & Release draft
7+ uses : PrestaShop/.github/.github/workflows/build-release.yml@master
0 commit comments