forked from DPDBaltics/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.3 KB
/
Copy pathrelease.yml
File metadata and controls
42 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: release
on:
release:
types: [ published, edited, updated, drafted]
jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
rm -rf .git
rm -rf .github
rm -rf tests
rm -rf vendor.zip
mkdir dpdbaltics
rsync -Rr ./ ./dpdbaltics
shopt -s extglob
rm -r !(dpdbaltics)
find . -maxdepth 1 -type f -exec rm "{}" \;
cd dpdbaltics && rm -rf dpdbaltics
cd ../ && zip -r dpdbaltics.zip dpdbaltics/
- name: Update release
id: update_release
uses: tubone24/update_release@v1.0
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
upload_url: ${{ steps.update_release.outputs.upload_url }}
asset_path: ./dpdbaltics.zip
asset_name: dpdbaltics.zip
asset_content_type: application/zip