-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·54 lines (52 loc) · 1.68 KB
/
release.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
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: Install PHP 5.6
uses: shivammathur/setup-php@v2
with:
php-version: '5.6'
- name: Run composer install
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_TOKEN }}"} }'
run: |
composer install --no-progress --prefer-dist --optimize-autoloader --no-scripts
- name: build
# IF YOU EDIT THIS, DON'T FORGET TO EDIT deploy.yml
run: |
cp .github/.htaccess vendor/.htaccess
rm -rf .git
rm -rf .github
rm -rf tests
rm -rf cypress
rm -rf .docker
mkdir saferpayofficial
rsync -Rr ./ ./saferpayofficial
shopt -s extglob
rm -r !(saferpayofficial)
find . -maxdepth 1 -type f -exec rm "{}" \;
cd saferpayofficial && rm -rf saferpayofficial
cd ../ && zip -r saferpayofficial.zip saferpayofficial/
- 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: ./saferpayofficial.zip
asset_name: saferpayofficial.zip
asset_content_type: application/zip