Skip to content

New release version

New release version #8

Workflow file for this run

on:
pull_request_target:
types: [closed]
branches: [master]
jobs:
release:
if: github.event.pull_request.merged == true
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 release 🤖
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_VERSION=$(bash .github/tag.sh)
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -am "build: Building correios-php new version"
git tag "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