|
1 | | -name: publish |
| 1 | +name: TERUpload |
2 | 2 |
|
3 | | -# @todo Consider to refactor this workflow to react on workflow_dispatch request instead of tag push events, |
4 | | -# executing all ci tests first before automatically creating a tag and release after clean state is |
5 | | -# ensured. |
6 | | - |
7 | | -on: |
| 3 | +on: |
8 | 4 | push: |
9 | 5 | tags: |
10 | 6 | - "**" |
11 | 7 |
|
12 | 8 | jobs: |
13 | | - publish: |
14 | | - name: Publish new version to TER |
15 | | - if: startsWith(github.ref, 'refs/tags/') |
16 | | - runs-on: ubuntu-20.04 |
17 | | - env: |
18 | | - TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }} |
19 | | - #TYPO3_EXCLUDE_FROM_PACKAGING: ${{ secrets.TYPO3_EXCLUDE_FROM_PACKAGING }} |
20 | | - |
| 9 | + TERUpload: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + fail-fast: false |
21 | 13 | steps: |
22 | | - - name: Checkout repository |
23 | | - uses: actions/checkout@v2 |
24 | | - |
25 | | - - name: Check tag |
26 | | - run: | |
27 | | - if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then |
28 | | - exit 1 |
29 | | - fi |
30 | | -
|
31 | | - - name: Get version |
32 | | - id: get-version |
33 | | - run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} |
34 | | - |
35 | | - - name: Get comment |
36 | | - id: get-comment |
37 | | - run: | |
38 | | - readonly local comment=$(git tag -n10 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g") |
39 | | -
|
40 | | - if [[ -z "${comment// }" ]]; then |
41 | | - echo ::set-output name=comment::Released version ${{ steps.get-version.outputs.version }} of tailor_ext |
42 | | - else |
43 | | - echo ::set-output name=comment::$comment |
44 | | - fi |
45 | | -
|
46 | | - - name: Setup PHP |
47 | | - uses: shivammathur/setup-php@v2 |
| 14 | + - uses: actions/checkout@v1 |
| 15 | + - uses: tomasnorre/typo3-upload-ter@v2 |
48 | 16 | with: |
49 | | - php-version: 7.4 |
50 | | - extensions: intl, mbstring, json, zip, curl |
51 | | - tools: composer:v2 |
52 | | - |
53 | | - - name: Install tailor |
54 | | - run: composer global require typo3/tailor --prefer-dist --no-progress |
55 | | - |
56 | | - - name: Publish to TER |
57 | | - run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }} |
| 17 | + api-token: ${{ secrets.TYPO3_API_TOKEN }} |
| 18 | + php-version: 8.3 |
0 commit comments