Update phpunit to 10 #3
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: Set Tag to Merged Pull Request | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
set-tag: | |
name: Get tags, Check and Set tag | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: PHP Version Check | |
run: php -v | |
- name: Validate Composer JSON | |
run: composer validate | |
- name: Get Version From Comopser JSON | |
id: new-version | |
run: | | |
echo version=$(cat composer.json | grep version | head -1 | grep -Po '\d+\.\d+\.\d+') >> $GITHUB_OUTPUT | |
- name: Show New Version | |
run: echo "version=${{ steps.new-version.outputs.version}}" | |
- name: Show Tags | |
run: git tag | |
- name: Check If The Version Is Not In The Tag List | |
run: | | |
for tag in `git tag` | |
do | |
if [ $tag = ${{ steps.new-version.outputs.version }} ]; then | |
echo "version ${{ steps.new-version.outputs.version }} already exists." | |
exit 1 | |
fi | |
done | |
echo "[OK.]" | |
- name: Set tag | |
run: | | |
git tag ${{ steps.new-version.outputs.version }} | |
git push origin ${{ steps.new-version.outputs.version }} |