Skip to content

Commit

Permalink
Merge pull request #114 from ministryofjustice/ci-release
Browse files Browse the repository at this point in the history
ci: added commitizen, semantic-release and circleci
  • Loading branch information
John Nolan authored Oct 22, 2020
2 parents 6e0799b + d57ab0b commit 6838a18
Show file tree
Hide file tree
Showing 8 changed files with 13,017 additions and 5,378 deletions.
67 changes: 57 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,60 @@
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Use a package of configuration called an orb.
orbs:
# Declare a dependency on the welcome-orb
welcome: circleci/[email protected]
# Orchestrate or schedule a set of jobs
jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:10.18.0
resource_class: small
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
publish:
working_directory: ~/repo
docker:
- image: circleci/node:10.18.0
resource_class: small
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm run build:package
- run:
name: Tag and Publish Version
command: npm run ci:release
dryrun:
working_directory: ~/repo
docker:
- image: circleci/node:10.18.0
resource_class: small
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm run build:package
- run:
name: Tag and Publish Version
command: npm run ci:dryrun

workflows:
# Name the workflow "welcome"
welcome:
# Run the welcome/run job in its own container
version: 2
build_and_test:
jobs:
- welcome/run
- build
- publish:
requires:
- build
filters:
branches:
only: master
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": [{"name": "master", "channel": "alpha", "prerelease": true}],
"dryRun": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
["@semantic-release/git", {
"assets": ["CHANGELOG.md", "package", "package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/npm"
]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

# Ministry of Justice Frontend

MOJ Frontend contains the code you need to start building user interfaces for UK Ministry of Justice government services.
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']};
Loading

0 comments on commit 6838a18

Please sign in to comment.