Skip to content

Commit

Permalink
New release Handliny
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Jun 15, 2024
1 parent e9c6d07 commit eff17fc
Show file tree
Hide file tree
Showing 2 changed files with 468 additions and 358 deletions.
53 changes: 44 additions & 9 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,51 @@
name: Release

on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
publish:
name: Publish new version to TER
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
env:
TYPO3_EXTENSION_KEY: ${{ secrets.TYPO3_EXTENSION_KEY }}
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- uses: actions/checkout@v1
- uses: the-coding-owl/action-typo3-extension-repository-upload@0.0.1
env:
SECRET_USERNAME: ${{ secrets.USERNAME }}
SECRET_PASSWORD: ${{ secrets.PASSWORD }}
EXTENSION_KEY: 'static_info_tables_zh'
UPLOAD_MESSAGE: 'Next release :) More information on https://github.com/lochmueller/static_info_tables_zh/releases'
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Get comment
id: get-comment
run: |
readonly local comment=$(git tag -n10 -l ${{ env.version }} | sed "s/^[0-9.]*[ ]*//g")
if [[ -z "${comment// }" ]]; then
echo "comment=Released version ${{ env.version }} of ${{ env.TYPO3_EXTENSION_KEY }}" >> $GITHUB_ENV
else
echo "comment=$comment" >> $GITHUB_ENV
fi
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
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 "${{ env.comment }}" ${{ env.version }}
Loading

0 comments on commit eff17fc

Please sign in to comment.