Skip to content

Commit

Permalink
Merge pull request #47 from snyk/chore/semantic-release
Browse files Browse the repository at this point in the history
chore: add semantic versioning and NPM release to CI workflow
  • Loading branch information
gablaxian authored Oct 25, 2021
2 parents 291d6fc + 49433d8 commit f2d7986
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ defaults: &defaults
jobs:
test:
<<: *defaults
docker:
- image: circleci/node:14-buster
steps:
- checkout
- attach_workspace:
Expand All @@ -24,10 +22,31 @@ jobs:
- run:
name: Test
command: npm test

release:
<<: *defaults
steps:
- checkout
- run:
name: Install deps
command: npm install
- run:
name: Release
command: npx semantic-release

workflows:
version: 2
test:
test_and_publish:
jobs:
- test:
name: Test

- release:
name: Release
context: nodejs-lib-release
requires:
- Test
filters:
branches:
only:
- main
16 changes: 16 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": "main",
"verifyConditions": [
"@semantic-release/github"
],
"prepare": [],
"publish": [
"@semantic-release/github"
],
"success": [
"@semantic-release/github"
],
"fail": [
"@semantic-release/github"
]
}

0 comments on commit f2d7986

Please sign in to comment.