File tree Expand file tree Collapse file tree 1 file changed +42
-9
lines changed
Expand file tree Collapse file tree 1 file changed +42
-9
lines changed Original file line number Diff line number Diff line change 11name : Build App
22on :
3- pull_request :
4- paths-ignore :
5- - ' **.md'
6- push :
7- paths-ignore :
8- - ' **.md'
3+ pull_request :
4+ paths-ignore :
5+ - ' **.md'
6+ push :
7+ paths-ignore :
8+ - ' **.md'
99
1010jobs :
1111 build :
@@ -21,11 +21,44 @@ jobs:
2121 run : npm install
2222 - name : Copy config.json
2323 run : |
24- cp ./resources/js/config.json.example ./resources/js/config.json
25- - name : Build static project
24+ cp ./resources/js/config.json.example ./resources/js/config.json
25+ - name : Build project
2626 run : npm run prod-laravel
2727 - name : Archive build artifacts
2828 uses : actions/upload-artifact@v2
2929 with :
3030 name : build
31- path : dist
31+ path : public
32+ release :
33+ if : github.ref == 'refs/heads/master'
34+ needs : build
35+ runs-on : ubuntu-latest
36+ steps :
37+ - uses : actions/checkout@v2
38+ - name : Download build artifact
39+ uses : actions/download-artifact@v2
40+ with :
41+ name : build
42+ - name : Create Release
43+ id : create_release
44+ uses : actions/create-release@v1
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ with :
48+ tag_name : ${{ github.ref }}
49+ release_name : Release ${{ github.ref }}
50+ body : |
51+ Release of ${{ github.ref }}
52+ draft : false
53+ prerelease : false
54+
55+ - name : Upload Release Artifact
56+ id : upload-release-asset
57+ uses : actions/upload-release-asset@v1
58+ env :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ with :
61+ upload_url : ${{ steps.create_release.outputs.upload_url }}
62+ asset_path : ./public/build
63+ asset_name : build.zip
64+ asset_content_type : application/zip
You can’t perform that action at this time.
0 commit comments