Skip to content

Commit

Permalink
Merge pull request #1097 from 10up/fix/build-stable-workflow
Browse files Browse the repository at this point in the history
Update stable release workflow to account for new build process.
  • Loading branch information
peterwilsoncc authored Jun 29, 2023
2 parents 2e2d445 + d2dfc8a commit f33e916
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.5.3
- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Set PHP version
uses: shivammathur/setup-php@2.17.0
uses: shivammathur/setup-php@2.25.4
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
Expand All @@ -37,11 +48,14 @@ jobs:
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"
cd release
git add .
git commit -m "Committing built version of $GITHUB_SHA"
git push origin stable
git push origin HEAD:stable

0 comments on commit f33e916

Please sign in to comment.