Skip to content

Commit

Permalink
fix: config.yml for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo committed Apr 19, 2023
1 parent 99c9555 commit 48559ee
Showing 1 changed file with 41 additions and 29 deletions.
70 changes: 41 additions & 29 deletions .circleci/config.yml
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:
Expand All @@ -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
Expand All @@ -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

0 comments on commit 48559ee

Please sign in to comment.