Skip to content

Commit

Permalink
Merge pull request #403 from Yoast/task/ter-releases
Browse files Browse the repository at this point in the history
[TASK] Implement auto release to TYPO3 Extension Repository
  • Loading branch information
haassie authored Dec 23, 2020
2 parents 4e70d86 + 28f0c8c commit 46e9dfd
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ At this point you're waiting on us to merge your pull request. We'll review all

Some issues are labeled "Patch-welcome". This means we see the value in the particular enhancement being suggested but have decided for now not to prioritize it. If you however decide to write a patch for it we'll gladly include it after some code review.

## Releasing a new version of the extension

To release a new version of the extension, you should follow these steps:
1. Make sure the `CHANGELOG.md` is updated
2. Make sure the new version is updated in `ext_emconf.php`
3. All latest code should be in the `master` branch
4. Create a new release and use the syntax `x.y.z` for the title of the release as well as the title of the tag.
5. A GitHub action `Publish new version to TER` should be triggered and will make sure the new version is released to TER
6. Check for the new version on https://packagist.org/packages/yoast-seo-for-typo3/yoast_seo

# Additional Resources
* [General GitHub Documentation](http://help.github.com/)
* [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
60 changes: 60 additions & 0 deletions .github/workflows/ter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: TYPO3 Extension Repository

on:
push:
tag:

jobs:
publish:
name: Publish new version to TER
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
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: Set up PHP Version
run: |
sudo update-alternatives --set php /usr/bin/php7.4
php -v
- name: Update Composer
run: |
sudo composer self-update
composer --version
- name: Composer Install
run: |
composer install
- name: Create token
run: |
rm -f token.txt
echo "Create token..."
TYPO3_API_USERNAME=${{ secrets.TYPO3_API_USERNAME }} TYPO3_API_PASSWORD=${{ secrets.TYPO3_API_PASSWORD }} vendor/bin/tailor ter:token:create --name="token for yoast_seo" --extensions=yoast_seo --expires=300 --no-ansi > token.txt
echo "And wait for token to be active... (60s)"
sleep 60s
- 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 -n10 -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 EXT:yoast_seo
else
echo ::set-output name=comment::$comment
fi
- name: Publish to TER
run: TYPO3_API_USERNAME=${{ secrets.TYPO3_API_USERNAME }} TYPO3_API_PASSWORD=${{ secrets.TYPO3_API_PASSWORD }} TYPO3_API_TOKEN=$(awk '/Access token:(.*)/ { print $3 }' token.txt) vendor/bin/tailor ter:publish --comment "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ We will follow [Semantic Versioning](http://semver.org/).
## Yoast SEO Premium for TYPO3
Besides the free version of our plugin, we also have a premium version. The free version enables you to do all necessary optimizations. With the premium version, we make it even easier to do! More information can be found on https://www.maxserv.com/yoast.

## 7.1.0 December 23, 2020
### Added
* If your site is secured with basic auth, we have you covered now. You can set the username and password in the settings so you are able to analyse pages that are secured by basic auth. Please be careful with adding credentials to your repository!

### Fixed
* Special characters in the title of a page are now rendered correctly in the snippet preview

### Changed
* Added automatic deployments to the TYPO3 Extension Repository
* A warning is added to the documentation that the Sitemap of EXT:yoast_seo should only be used in TYPO3 v8.

## 7.0.7 December 9, 2020
### Fixed
* It should not matter if a backend user has backend access to the page which is used to preview. This is mainly when using Yoast SEO for records other than pages and the detail page itself is not accessible for the backend user.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project = Yoast SEO for TYPO3
# ... (recommended) version, displayed next to title (desktop) and in <meta name="book-version"
# .................................................................................

release = 5.1.0
release = master

# .................................................................................
# ... (recommended) displayed in footer
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
conf.py:
copyright: 2017
project: Yoast SEO for TYPO3
version: 1.0
release: 1.0.0
version: master
release: master
latex_documents:
- - Index
- yoast_seo.tex
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"phpstan/phpstan": "^0.12.32",
"phpstan/extension-installer": "^1.0",
"saschaegerer/phpstan-typo3": "^0.13.1",
"slam/phpstan-extensions": "^5.0"
"slam/phpstan-extensions": "^5.0",
"typo3/tailor": "^1.1"
},
"replace": {
"typo3-ter/yoast-seo": "self.version"
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'dependencies' => '',
'state' => 'stable',
'uploadfolder' => 0,
'version' => '7.0.7',
'version' => '7.1.0',
'constraints' => [
'depends' => [
'typo3' => '8.7.0-10.4.99',
Expand Down

0 comments on commit 46e9dfd

Please sign in to comment.