mirror of https://github.com/TryGhost/Ghost.git
Enabled tests and canary build on 4.0 branch
no issue - we want tests to run on the 4.0 branch, along with Slack notifications - we also want a canary build of the 4.0 branch, but this requires some alterations to bump to a premajor + use a different artifact name
This commit is contained in:
parent
9c3c90a4be
commit
032741a5ef
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- '4.0'
|
||||||
- 3.*
|
- 3.*
|
||||||
- 2.x
|
- 2.x
|
||||||
- 'renovate/*'
|
- 'renovate/*'
|
||||||
|
@ -22,7 +23,7 @@ jobs:
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- uses: daniellockyer/action-slack-build@master
|
- uses: daniellockyer/action-slack-build@master
|
||||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
env:
|
env:
|
||||||
|
@ -107,7 +108,7 @@ jobs:
|
||||||
- run: grunt test-regression --verbose
|
- run: grunt test-regression --verbose
|
||||||
|
|
||||||
- uses: daniellockyer/action-slack-build@master
|
- uses: daniellockyer/action-slack-build@master
|
||||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
env:
|
env:
|
||||||
|
@ -153,7 +154,7 @@ jobs:
|
||||||
ghost update -f -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
ghost update -f -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
||||||
|
|
||||||
- uses: daniellockyer/action-slack-build@master
|
- uses: daniellockyer/action-slack-build@master
|
||||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
env:
|
env:
|
||||||
|
@ -162,7 +163,7 @@ jobs:
|
||||||
canary:
|
canary:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [lint, migrations, test, ghost-cli]
|
needs: [lint, migrations, test, ghost-cli]
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||||
name: Canary
|
name: Canary
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -180,16 +181,42 @@ jobs:
|
||||||
git config --global user.email "ghost@example.com"
|
git config --global user.email "ghost@example.com"
|
||||||
|
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: grunt master --upstream=origin
|
- run: grunt master
|
||||||
|
|
||||||
|
- run: git checkout 4.0 && yarn
|
||||||
|
if: github.ref == 'refs/heads/4.0'
|
||||||
|
- run: git checkout 4.0 && yarn
|
||||||
|
if: github.ref == 'refs/heads/4.0'
|
||||||
|
working-directory: core/client
|
||||||
|
|
||||||
- run: echo "ghost_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
- run: echo "ghost_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
- run: echo "ghost_admin_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
- run: echo "ghost_admin_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
working-directory: core/client
|
working-directory: core/client
|
||||||
- run: if [ -n "$(git status --porcelain)" ]; then git add core/client content/themes/casper && git commit -m "Updated Ghost-Admin and Casper"; fi
|
- run: if [ -n "$(git status --porcelain)" ]; then git add core/client content/themes/casper && git commit -m "Updated Ghost-Admin and Casper"; fi
|
||||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
|
||||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
- run: npm version premajor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||||
|
if: github.ref == 'refs/heads/4.0'
|
||||||
|
- run: npm version premajor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||||
|
if: github.ref == 'refs/heads/4.0'
|
||||||
working-directory: core/client
|
working-directory: core/client
|
||||||
|
|
||||||
|
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
working-directory: core/client
|
||||||
|
|
||||||
- run: grunt release --skip-update
|
- run: grunt release --skip-update
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: github.ref == 'refs/heads/4.0'
|
||||||
|
with:
|
||||||
|
name: ghost-4.0-canary
|
||||||
|
path: .dist/release/*
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
with:
|
with:
|
||||||
name: ghost-canary
|
name: ghost-canary
|
||||||
path: .dist/release/*
|
path: .dist/release/*
|
||||||
|
|
Loading…
Reference in New Issue