Skip to content

Merge branch 'develop' into trunk #29

Merge branch 'develop' into trunk

Merge branch 'develop' into trunk #29

Workflow file for this run

name: Build Stable Release
on:
push:
branches:
- trunk
jobs:
stable:
name: Push (merge) to trunk
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Set PHP version
uses: shivammathur/[email protected]
with:
php-version: 7.4
tools: composer:v2, wp
- name: Clone stable branch to the release folder
env:
GITHUB_REPOSITORY: ${{ github.event.repository.name }}
run: |
git clone --depth 1 --branch stable https://github.com/$GITHUB_REPOSITORY.git release
cd release
git branch --show-current
mv .git $RUNNER_TEMP/.git
cd ..
- name: Check versions
run: |
npm -v
node -v
php -v
composer -v
- name: Install and build
run: |
composer install --no-dev
npm install
npm run release
- name: Push to Stable
env:
GITHUB_REPOSITORY: ${{ github.event.repository.name }}
GITHUB_SHA: ${{ github.event.commits[0].sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd release
mv $RUNNER_TEMP/.git .git
git branch --show-current
git config --global user.email "[email protected]"
git config --global user.name "10upbot on GitHub"
git remote set-url origin "https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git"
git add .
git commit -m "Committing built version of $GITHUB_SHA"
git push origin HEAD:stable