➕ chore: update composer depdencies, update annotations #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release 🚀 | |
# https://tomasvotruba.com/blog/how-to-release-php-81-and-72-package-in-the-same-repository/ | |
# https://github.com/TomasVotruba/cognitive-complexity/blob/main/.github/workflows/downgraded_release.yaml | |
# https://github.com/symplify/config-transformer/blob/main/.github/workflows/downgraded_release.yaml | |
# https://github.com/driftingly/rector-laravel/blob/main/.github/workflows/downgraded_release.yaml | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: none | |
- uses: ramsey/composer-install@v2 | |
# Downgrade to PHP 7.4 | |
- run: vendor/bin/rector process src --config build/rector-downgrade-php-81.php --ansi | |
# Copy composer | |
- run: cp build/composer-php-81.json composer.json | |
# Clear the dev files | |
- run: | | |
rm -rf \ | |
.editorconfig \ | |
.gitattributes \ | |
.gitignore \ | |
.github \ | |
.changeset \ | |
.husky \ | |
commitlint.config.js \ | |
lint-staged.config.js \ | |
phpunit.xml.dist \ | |
tests \ | |
ecs.php \ | |
phpstan.neon.dist \ | |
rector.php \ | |
build \ | |
stubs \ | |
package.json \ | |
CHANGELOG.md \ | |
CONTRIBUTING.md \ | |
docker \ | |
compose.yml \ | |
# Setup git bot user | |
- run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
# Publish to the same repository with a new tag | |
- name: Tag downgraded code | |
run: | | |
git commit -a -m ":package: ci: php-8.1 downgraded ${GITHUB_REF#refs/tags/}" | |
# Force push tag, so there is only a single version | |
git tag "${GITHUB_REF#refs/tags/}" --force | |
git push origin "${GITHUB_REF#refs/tags/}" --force |