2021-06-01 19:04:16 +03:00
|
|
|
name: Canary Build
|
|
|
|
on: workflow_dispatch
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 1
|
|
|
|
jobs:
|
|
|
|
canary:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
name: Canary
|
|
|
|
steps:
|
2022-03-01 21:52:51 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-06-01 19:04:16 +03:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: true
|
2022-02-25 12:13:29 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2021-11-25 11:07:45 +03:00
|
|
|
env:
|
|
|
|
FORCE_COLOR: 0
|
2021-06-01 19:04:16 +03:00
|
|
|
with:
|
2021-10-26 22:12:37 +03:00
|
|
|
node-version: '14.17.0'
|
2021-11-30 11:01:22 +03:00
|
|
|
cache: yarn
|
2021-06-01 19:04:16 +03:00
|
|
|
|
|
|
|
- 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
|
2021-07-06 12:22:07 +03:00
|
|
|
- run: yarn main
|
2021-06-01 19:04:16 +03:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2022-03-03 23:04:30 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-06-01 19:04:16 +03:00
|
|
|
with:
|
|
|
|
name: ghost-canary
|
|
|
|
path: .dist/release/*
|
|
|
|
retention-days: 7
|