Merge pull request #360 from pantheon-systems/release_2.1.4 #11
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: Build and Tag | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
wordpress: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
composer install --no-dev -o | |
- name: Setup | |
run: | | |
VERSION=$(cat README.md| grep 'Stable tag:' | awk '{print $3}') | |
[[ "$VERSION" != "" ]] || exit 1 | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Tag | |
run: | | |
echo "Releasing version $VERSION ..." | |
[[ "$VERSION" != "" ]] || exit 1 | |
git config user.name Pantheon Automation | |
git config user.email [email protected] | |
git checkout -b "release-$VERSION" | |
git add -f vendor/* | |
git commit -m "Release $VERSION" | |
git tag "$VERSION" | |
git push --tags | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} |