Skip to content

Commit

Permalink
Merge pull request #4 from robcresswell/chore/automate-releases
Browse files Browse the repository at this point in the history
chore: automate releases
  • Loading branch information
robcresswell authored Jan 27, 2020
2 parents cf7dd4f + d6fe972 commit dc2fd37
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: 2.1
defaults: &defaults
working_directory: ~/ci
resource_class: small
docker:
- image: robcresswell/circleci-node-alpine
commands:
install_deps:
description: Install dependencies (from cache, if possible)
steps:
- checkout
- restore_cache:
keys:
# when lock file changes, use increasingly general patterns to restore cache
- yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-{{ .Branch }}-
- yarn-
- run:
name: Install dependencies
command: yarn --frozen-lockfile
- save_cache:
paths:
- ~/.cache/yarn
key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
jobs:
snyk:
<<: *defaults
steps:
- checkout
- run:
name: Run snyk
command: npx snyk test
test:
<<: *defaults
steps:
- install_deps
- run:
name: Run tests
command: yarn test
- store_artifacts:
path: reports/coverage
- store_test_results:
path: reports
lint:
<<: *defaults
steps:
- install_deps
- run:
name: Run linting tasks
command: yarn lint
release:
<<: *defaults
steps:
- install_deps
- run: yarn build
- run: npx semantic-release
workflows:
version: 2
test_and_release:
jobs:
- snyk
- test
- lint
- release:
requires:
- snyk
- lint
- test
19 changes: 19 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 1

update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "live"
default_reviewers:
- "robcresswell"
default_assignees:
- "robcresswell"
version_requirement_updates: "increase_versions"
commit_message:
prefix: "feat"
prefix_development: "chore"
include_scope: true
automerged_updates:
- match:
dependency_type: "development"
update_type: "all"
14 changes: 14 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"branch": "dev",
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/github",
{
"successComment": false
}
],
"@semantic-release/npm",
"@semantic-release/release-notes-generator"
]
}

0 comments on commit dc2fd37

Please sign in to comment.