diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d6900275..49da35b6 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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/) diff --git a/.github/workflows/ter.yml b/.github/workflows/ter.yml index f30dfbbf..2a90a62e 100644 --- a/.github/workflows/ter.yml +++ b/.github/workflows/ter.yml @@ -1,15 +1,23 @@ name: TYPO3 Extension Repository -on: [push] +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 @@ -43,16 +51,10 @@ jobs: 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 ${{ env.TYPO3_EXTENSION_KEY }} + 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: Check versions - 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:versions yoast_seo --no-ansi -vvv - - - name: Debug - run: | - echo "Version: ${{ steps.get-version.outputs.version }}" - echo "Comment: ${{ steps.get-comment.outputs.comment }}" \ No newline at end of file + - 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 }} \ No newline at end of file