Skip to content

Commit

Permalink
Merge pull request #11 from webcoast-dk/task/automated-ter-publishing
Browse files Browse the repository at this point in the history
[TASK] Add GitHub Actions TER publishing workflow
  • Loading branch information
thommyhh authored May 22, 2021
2 parents f4f6b94 + ea8c5ab commit 6161db8
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 29 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: publish
on:
push:
tags:
- v?[0-9]+.[0-9]+.[0-9]+
jobs:
publish:
name: Publish new version to TER
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-20.04
env:
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Check tag
run: |
if ! [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
exit 1
fi
- name: Get version
id: get-version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/}

- name: Get comment
id: get-comment
run: |
readonly local comment=$(git tag -n10 -l v${{ steps.get-version.outputs.version }} | sed "s/^v[0-9.]*[ ]*//g")
if [[ -z "${comment// }" ]]; then
echo ::set-output name=comment::Released version ${{ steps.get-version.outputs.version }}
else
echo ::set-output name=comment::$comment
fi
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: intl, mbstring, json, zip, curl
tools: composer:v2

- name: Install tailor
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest

- name: Publish to TER
run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }}
55 changes: 26 additions & 29 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
<?php

$EM_CONF[$_EXTKEY] = array(
'title' => 'Versatile Crawler',
'description' => 'A versatile and extendable crawler',
'category' => 'plugin',
'author' => 'Thorben Nissen',
'author_email' => 'thorben.nissen@kapp-hamburg.de',
'author_company' => '',
'shy' => '',
'priority' => '',
'module' => '',
'state' => 'stable',
'internal' => '',
'uploadfolder' => '0',
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '1.1.0-dev',
'constraints' => array(
'depends' => array(
'typo3' => '9.5.0-10.4.99',
),
'conflicts' => array(
'crawler' => ''
),
'suggests' => array(
),
),
);
$EM_CONF[$_EXTKEY] = [
'title' => 'Versatile Crawler',
'description' => 'A versatile and extendable crawler',
'version' => '1.1.0',
'category' => 'plugin',
'constraints' => [
'depends' => [
'typo3' => '9.5.0-10.4.99',
],
'conflicts' => [
'crawler' => ''
],
'suggests' => [
],
],
'state' => 'stable',
'clearCacheOnLoad' => 0,
'author' => 'Thorben Nissen',
'author_email' => 'thorben@webcoast.dk',
'author_company' => '',
'autoload' => [
'psr-4' => [
'WEBcoast\\VersatileCrawler\\' => 'Classes'
]
]
];

0 comments on commit 6161db8

Please sign in to comment.