mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
489add6e5e
- The default Node version on GitHub Actions is moving to Node 14 and we want to keep building it on 12 for now, so this commit pins the version to 12.18.0
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Build
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
zip:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
- uses: actions/setup-node@v1
|
|
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: git add core/client content/themes/casper && git commit -m "Updated Ghost-Admin and Casper"
|
|
|
|
- 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
|