Merge pull request #122 from uvasoftware/bernardo/121 #26
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: Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Deploying" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Tag release and rev version" | |
shell: /usr/bin/bash -ex {0} | |
run: | | |
# tagging release: | |
VERSION=$(cat VERSION) | |
echo "################### using version: v$VERSION ###################" | |
echo $(pwd) | |
ls -l . | |
# tag repo | |
git config --global user.email "[email protected]" | |
git config --global user.name "CI" | |
sed -i -e "s/VERSION = '.*'/VERSION = '$VERSION'/" src/Scanii/ScaniiClient.php | |
php -l src/Scanii/ScaniiClient.php | |
git status | |
git commit -a -m "bump to ${VERSION} [ci skip]" | |
git push origin main | |
git tag -a v"${VERSION}" -m "Release by Github Actions v${VERSION}" | |
git push origin v"${VERSION}" | |
- name: "Notify composer" | |
run: | | |
curl -XPOST -H'content-type:application/json' 'https://packagist.org/api/update-package?username=cleverfoo&apiToken='${API_TOKEN} -d'{"repository":{"url":"https://packagist.org/packages/uvasoftware/scanii-php"}}' | |
env: | |
API_TOKEN: ${{ secrets.PACKAGIST_API_TOKEN }} |