Skip to content

Commit 8ec055c

Browse files
author
Christopher Rath
committed
Initial commit
0 parents  commit 8ec055c

File tree

68 files changed

+6515
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+6515
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish new extension version to TER
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish new version to TER
10+
if: startsWith(github.ref, 'refs/tags/')
11+
runs-on: ubuntu-20.04
12+
env:
13+
TYPO3_EXTENSION_KEY: ${{ secrets.TYPO3_EXTENSION_KEY }}
14+
TYPO3_API_TOKEN: ${{ secrets.TYPO3_TER_ACCESS_TOKEN }}
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Check tag
20+
run: |
21+
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
22+
exit 1
23+
fi
24+
25+
- name: Get version
26+
id: get-version
27+
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
28+
29+
- name: Get comment
30+
id: get-comment
31+
run: |
32+
readonly local comment=$(git tag -n10 -l ${{ env.version }} | sed "s/^[0-9.]*[ ]*//g")
33+
34+
if [[ -z "${comment// }" ]]; then
35+
echo "comment=Released version ${{ env.version }} of ${{ env.TYPO3_EXTENSION_KEY }} -- for details see $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases" >> $GITHUB_ENV
36+
else
37+
echo "comment=$comment -- for details see $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases" >> $GITHUB_ENV
38+
fi
39+
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: 7.4
44+
extensions: intl, mbstring, json, zip, curl
45+
tools: composer:v2
46+
47+
- name: Install tailor
48+
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest
49+
50+
- name: Publish to TER
51+
run: |
52+
php ~/.composer/vendor/bin/tailor set-version "${{ env.version }}"
53+
php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ env.comment }}" "${{ env.version }}"

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/vendor/
2+
/public/
3+
/composer.lock
4+
.buildpath
5+
.idea
6+
.project
7+
.settings

.gitlab-ci.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
stages:
2+
- preparation
3+
- 'PHP 8.1'
4+
5+
6+
default:
7+
before_script:
8+
- apt-get update -yqq
9+
- apt-get install -yqq git libxml2-dev libzip-dev zip unzip
10+
11+
# Install PHP extensions
12+
- docker-php-ext-install xml zip
13+
14+
15+
# Job template
16+
.composer:
17+
stage: preparation
18+
script:
19+
- php --version
20+
# Install composer
21+
- curl -sS https://getcomposer.org/installer | php
22+
# Install all project dependencies
23+
- php composer.phar install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
24+
artifacts:
25+
paths:
26+
- vendor/
27+
- public/
28+
expire_in: 1 days
29+
when: always
30+
cache:
31+
paths:
32+
- vendor/
33+
- public/
34+
35+
36+
# Job template: Run code sniffer
37+
.phpcs:
38+
script:
39+
- php --version
40+
- vendor/bin/phpcs Classes/ --standard=PSR12 --extensions=php --report=junit > phpcs-report.xml
41+
artifacts:
42+
reports:
43+
junit:
44+
- phpcs-report.xml
45+
46+
47+
# Job template: Run static analysis
48+
.phpstan:
49+
script:
50+
- php --version
51+
- vendor/bin/phpstan analyse --error-format=junit --no-progress -c ./phpstan.neon > phpstan-report.xml
52+
artifacts:
53+
reports:
54+
junit:
55+
- phpstan-report.xml
56+
57+
58+
# Job template: Rector PHP 8.1 and TYPO3 v11
59+
.rector:
60+
script:
61+
- php --version
62+
- vendor/bin/rector process --dry-run
63+
64+
65+
# PHP 8.1
66+
.php8.1:
67+
image: php:8.1
68+
stage: 'PHP 8.1'
69+
before_script:
70+
- !reference [ default, before_script ]
71+
# Install & enable Xdebug for code coverage reports
72+
- pecl install xdebug-3.2.1
73+
- docker-php-ext-enable xdebug
74+
75+
composer:8.1:
76+
extends:
77+
- .php8.1
78+
- .composer
79+
80+
.php8.1-test:
81+
extends:
82+
- .php8.1
83+
needs: [ 'composer:8.1' ]
84+
85+
phpcs:8.1:
86+
extends:
87+
- .php8.1-test
88+
- .phpcs
89+
90+
phpstan:8.1:
91+
extends:
92+
- .php8.1-test
93+
- .phpstan
94+
95+
rector:8.1:
96+
extends:
97+
- .php8.1-test
98+
- .rector
99+

CHANGELOG.md

Whitespace-only changes.

0 commit comments

Comments
 (0)