Skip to content

Commit 2bb1e38

Browse files
committed
Add some checks and automatically create distribution ZIP archive on release
1 parent 177ece4 commit 2bb1e38

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.* export-ignore

.github/workflows/checks.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags-ignore:
8+
- "**"
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
15+
check-syntax:
16+
name: PHP ${{ matrix.php-version }} Syntax
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
php-version:
21+
- "5.5"
22+
- "8.4"
23+
steps:
24+
-
25+
name: Checkout
26+
uses: actions/checkout@v4
27+
-
28+
name: Install PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php-version }}
32+
extensions: opcache
33+
coverage: none
34+
tools: none
35+
-
36+
name: Check syntax
37+
uses: mlocati/check-php-syntax@v1
38+
with:
39+
fail-on-warnings: true
40+
41+
check-install:
42+
name: Install on Concrete ${{ matrix.ccm-version }}
43+
runs-on: ubuntu-latest
44+
container: ghcr.io/concrete5-community/docker5:${{ matrix.ccm-version }}
45+
strategy:
46+
matrix:
47+
ccm-version:
48+
- 8.5.2
49+
- "9.0"
50+
- "9.1"
51+
- "9.2"
52+
- latest
53+
steps:
54+
-
55+
name: Checkout
56+
uses: actions/checkout@v4
57+
-
58+
name: Check composer.json
59+
run: sudo -u www-data composer --ansi --no-interaction validate --strict -- "$GITHUB_WORKSPACE/composer.json"
60+
-
61+
name: Prepare package
62+
run: ln -s "$GITHUB_WORKSPACE" /app/packages/empty_anchor
63+
-
64+
name: Start services
65+
run: ccm-service start db
66+
-
67+
name: Core info
68+
run: sudo -u www-data /app/concrete/bin/concrete5 --ansi --no-interaction c5:info
69+
-
70+
name: Install package
71+
run: sudo -u www-data /app/concrete/bin/concrete5 --ansi --no-interaction c5:package:install empty_anchor
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Attach ZIP to GitHub Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
attach-zip:
10+
name: Attach ZIP to release
11+
runs-on: ubuntu-latest
12+
steps:
13+
-
14+
name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '7.4'
18+
tools: composer:v2
19+
coverage: none
20+
-
21+
name: Checkout
22+
uses: actions/checkout@v4
23+
-
24+
name: Create and attach ZIP
25+
uses: concrete5-community/gh-package-release-attach@main
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
remove-files: |
30+
composer.json
31+
composer.lock

0 commit comments

Comments
 (0)