Skip to content

Commit b14218f

Browse files
feat: add github workflow
1 parent 2638a91 commit b14218f

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/publish-ter.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish to TER
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish:
13+
name: Publish release to TER
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Get version
26+
shell: bash
27+
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
28+
29+
- name: Get TER upload comment
30+
shell: bash
31+
run: |
32+
comment="$(git tag -l "$version" --format='%(contents)')"
33+
34+
if [[ -z "${comment// }" ]]; then
35+
comment="Released version $version"
36+
fi
37+
38+
{
39+
echo 'comment<<EOF'
40+
echo "$comment"
41+
echo EOF
42+
} >> "$GITHUB_ENV"
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: '8.3'
48+
extensions: intl, mbstring, json, zip, curl
49+
tools: composer:v2
50+
51+
- name: Install Tailor
52+
run: composer global require typo3/tailor --prefer-dist --no-progress --no-interaction
53+
54+
- name: Publish to TER
55+
run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ env.comment }}" "${{ env.version }}"

0 commit comments

Comments
 (0)