Merge pull request #45 from rafaelstz/patch-1 #6
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: Generate github tag version ☕ | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, '--skip-tagging')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Installing Composer dependencies ⬇️ | |
run: composer install --prefer-dist --no-progress | |
- name: Removing development folders 🗑️ | |
run: | | |
rm -r -f tests/ | |
- name: Removing development files 🗑️ | |
run: | | |
rm -f composer.lock | |
rm -f CONTRIBUTING.md | |
rm -f CODE_OF_CONDUCT.md | |
rm -f phpunit.xml | |
rm -f phpunit.xml.bak | |
rm -f README.md | |
rm -f .gitignore | |
- name: Create a new GitHub tag 🤖 | |
run: | | |
TAG_VERSION=$(bash .github/tags.sh) | |
rm -r -f .github/ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Matheus Aguiar" | |
git add . | |
git commit -am "build: Building correios-php new version" | |
git tag -a v$TAG_VERSION -m "Add new tag version: v$TAG_VERSION" | |
git push origin v$TAG_VERSION | |
echo "All right! 🎉" | |
- name: Update the packagist version ⬆️ | |
run: | | |
curl \ | |
-X POST \ | |
-H "Content Type: application/json" \ | |
-H "Secret: ${{ secrets.PACKAGISTTOKEN }}" \ | |
https://packagist.org/api/github?username=devaguia | |