forked from rodber/chevereto-free
-
-
Notifications
You must be signed in to change notification settings - Fork 23
72 lines (60 loc) · 2.18 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["7.4"]
name: Release on PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
env:
fail-fast: true
- name: Validate composer
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Packaging
run: |
rm -rf .git .github .dockerignore docs app/settings.php docker-bake.hcl httpd-php-dev.yml httpd-php.Dockerfile httpd-php.yml sync.sh
- name: Archive dev
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: "${{ steps.get_version.outputs.VERSION }}-lite.zip"
- name: Install dependencies
run: composer install --prefer-dist --no-progress --classmap-authoritative --ignore-platform-reqs
- name: Archive release
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: "${{ steps.get_version.outputs.VERSION }}.zip"
exclusions: "${{ steps.get_version.outputs.VERSION }}-lite.zip"
- name: Upload artifacts
uses: ncipollo/release-action@v1
with:
allowUpdates: true
removeArtifacts: true
omitBodyDuringUpdate: true
artifacts: "${{ steps.get_version.outputs.VERSION }}.zip,${{ steps.get_version.outputs.VERSION }}-lite.zip"
token: ${{ secrets.GITHUB_TOKEN }}