mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -05:00
Inlined canary build workflow into tests
- this allows us to rely on successful test steps before building a canary zip
This commit is contained in:
parent
ab5833182b
commit
ff11b42c33
2 changed files with 36 additions and 51 deletions
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
|
@ -1,51 +0,0 @@
|
|||
name: Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
canary:
|
||||
runs-on: ubuntu-18.04
|
||||
name: Canary
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.18.0'
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global pull.rebase true
|
||||
git config --global user.name "Ghost CI"
|
||||
git config --global user.email "ghost@example.com"
|
||||
|
||||
- run: yarn
|
||||
- run: grunt master --upstream=origin
|
||||
|
||||
- run: echo "ghost_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
- run: echo "ghost_admin_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
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: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
working-directory: core/client
|
||||
|
||||
- run: grunt release --skip-update
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ghost-canary
|
||||
path: .dist/release/*
|
||||
retention-days: 7
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ghost-latest
|
||||
path: .dist/release/*
|
||||
retention-days: 7
|
36
.github/workflows/test.yml
vendored
36
.github/workflows/test.yml
vendored
|
@ -158,3 +158,39 @@ jobs:
|
|||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
canary:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: [lint, migrations, test, ghost-cli]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
name: Canary
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.18.0'
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global pull.rebase true
|
||||
git config --global user.name "Ghost CI"
|
||||
git config --global user.email "ghost@example.com"
|
||||
|
||||
- run: yarn
|
||||
- run: grunt master --upstream=origin
|
||||
- run: echo "ghost_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
- run: echo "ghost_admin_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
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: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
working-directory: core/client
|
||||
- run: grunt release --skip-update
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ghost-canary
|
||||
path: .dist/release/*
|
||||
retention-days: 7
|
||||
|
|
Loading…
Add table
Reference in a new issue