-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
newspack: newspack/[email protected] | ||
|
||
commands: | ||
checkout_code: | ||
steps: | ||
|
@@ -11,19 +8,35 @@ commands: | |
at: ~/ | ||
|
||
jobs: | ||
# Release job. Required over newspack/release because of the need to version bump additional files. | ||
release: | ||
build: | ||
docker: | ||
- image: circleci/node:latest | ||
- image: cimg/node:16.11.1 | ||
steps: | ||
- checkout_with_workspace | ||
- set_node_version | ||
- checkout_code | ||
- run: | ||
name: Install rsync | ||
command: sudo apt-get update && sudo apt-get install rsync | ||
name: Install dependencies | ||
command: npm ci | ||
- persist_to_workspace: | ||
root: ~/ | ||
paths: | ||
- project | ||
|
||
# Linting | ||
lint: | ||
docker: | ||
- image: cimg/node:16.11.1 | ||
steps: | ||
- checkout_code | ||
- run: | ||
name: Install PHP packages | ||
command: composer install --no-dev --no-scripts | ||
name: Run Linter | ||
command: npm run lint | ||
|
||
# Release job | ||
release: | ||
docker: | ||
- image: cimg/node:16.11.1 | ||
steps: | ||
- checkout_code | ||
- run: | ||
name: Release new version | ||
command: npm run release | ||
|
@@ -32,38 +45,37 @@ jobs: | |
paths: | ||
- project | ||
|
||
# Reset alpha branch after a release and publish child themes' releases | ||
post_release: | ||
docker: | ||
- image: cimg/node:16.11.1 | ||
steps: | ||
- checkout_code | ||
- run: | ||
name: Perform post-release chores | ||
command: ./node_modules/newspack-scripts/post-release.sh | ||
|
||
workflows: | ||
version: 2 | ||
all: | ||
main: | ||
jobs: | ||
- newspack/build | ||
- newspack/lint-js-scss: | ||
- build | ||
- lint: | ||
requires: | ||
- newspack/build | ||
- newspack/build-distributable: | ||
requires: | ||
- newspack/build | ||
archive-name: 'newspack-block-theme' | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- build | ||
- release: | ||
requires: | ||
- newspack/build | ||
- build | ||
filters: | ||
branches: | ||
only: | ||
- release | ||
- alpha | ||
- /^hotfix\/.*/ | ||
- newspack/post-release: | ||
- post_release: | ||
requires: | ||
- release | ||
filters: | ||
branches: | ||
only: | ||
- release | ||
php: | ||
jobs: | ||
- newspack/lint-php |