From c38fa1f9da12a08186e520bddcb3327ba79e1386 Mon Sep 17 00:00:00 2001 From: Benjamin Jasper Date: Fri, 8 Nov 2024 15:49:11 +0100 Subject: [PATCH] feat: more release preparations --- .github/workflows/publish.yaml | 51 ++++++++++++++++++++++++++++++++++ README.md | 3 +- ext_emconf.php | 46 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yaml create mode 100644 ext_emconf.php diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..0dafa54 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,51 @@ +name: publish +on: + workflow_dispatch: + release: + types: [ published ] +jobs: + 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_USERNAME: ${{ secrets.TYPO3_API_USERNAME }} + TYPO3_API_PASSWORD: ${{ secrets.TYPO3_API_PASSWORD }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - 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 ::set-output name=version::${GITHUB_REF/refs\/tags\//} + + - name: Get comment + id: get-comment + run: | + readonly local comment=$(git tag -n1 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g") + + if [[ -z "${comment// }" ]]; then + echo ::set-output name=comment::Released version ${{ steps.get-version.outputs.version }} of ${{ env.TYPO3_EXTENSION_KEY }} + 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 }} \ No newline at end of file diff --git a/README.md b/README.md index feff584..5900735 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # Hubspot Forms Extension for TYPO3 -This extension will help displaying Hubspot forms in our pages by **dynamically** loading in any given Form using your PortalID and Access Token through the HubSpot API +This extension will help displaying Hubspot forms in our pages by **dynamically** loading in any given form using the HubSpot API ## Installation (Composer) To install the extension using composer, run `composer req itx/hubspot-forms` ## Configuration +* Create a HubSpot access token with the following scope: `forms` * To start using the extension, you will first have to set your **Access Token** and **PortalID** in the TYPO3 Backend `Settings > Extension Configuration > hubspot_forms` * Alternatively you can configure these settings inside your `AdditionalConfiguration.php` file located under `public/typo3conf/AdditionalConfiguration.php` e.g. diff --git a/ext_emconf.php b/ext_emconf.php new file mode 100644 index 0000000..951e2c0 --- /dev/null +++ b/ext_emconf.php @@ -0,0 +1,46 @@ + 'Dynamic HubSpot Forms', + 'description' => 'Automatically load HubSpot forms in TYPO3 pages via the HubSpot API', + 'category' => 'plugin', + 'author' => '', + 'author_company' => 'it.x informationssysteme gmbh', + 'author_email' => 'typo-itx@itx.de', + 'state' => 'stable', + 'uploadfolder' => 1, + 'createDirs' => '', + 'clearCacheOnLoad' => true, + 'version' => '1.0.0', + 'constraints' => [ + 'depends' => [ + 'typo3' => '11.5.1-13.9.99' + ], + 'conflicts' => [], + 'suggests' => [], + ], +];