-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (57 loc) · 2.15 KB
/
autopublish-to-ter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
tag-valid:
name: Check for valid tag
# Run only if it's a tag in general (as regex is not possible here)
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
# Save status for use in other jobs
outputs:
status: ${{ steps.check-tag.outputs.match }}
steps:
# Check for a valid tag
- name: Check if trigger is a valid tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi
ter-release:
name: TYPO3 TER release
# Depend on a valid tag
#needs: tag-valid
#if: needs.tag-valid.outputs.status == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.1]
env:
# Add your extension key
TYPO3_EXTENSION_KEY: google_cloud_storage_fal
TYPO3_USER: ${{ secrets.TYPO3_USER }}
TYPO3_PASSWORD: ${{ secrets.TYPO3_PASSWORD }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.TYPO3_EXTENSION_KEY }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, mbstring, xml, soap, zip, curl
- name: Install TYPO3 TER client
run: composer global require namelesscoder/typo3-repository-client "^2.0" --prefer-dist --no-progress --no-suggest
- name: Remove .git folder
run: rm -rf ./$TYPO3_EXTENSION_KEY/.git
- name: Remove .github folder
run: rm -rf ./$TYPO3_EXTENSION_KEY/.github
- name: Upload EXT:${{ env.TYPO3_EXTENSION_KEY }} as ${{ github.event.ref }} to TER
run: php ~/.composer/vendor/bin/upload "./$TYPO3_EXTENSION_KEY" "$TYPO3_USER" "$TYPO3_PASSWORD" "${{ github.event.head_commit.message }}"