Skip to content

Merge pull request #362 from pantheon-systems/fix-gha-permissions #12

Merge pull request #362 from pantheon-systems/fix-gha-permissions

Merge pull request #362 from pantheon-systems/fix-gha-permissions #12

Workflow file for this run

name: Build and Tag
on:
push:
branches:
- 'master'
permissions:
contents: write
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 }}