Skip to content

Commit

Permalink
Merge pull request #104 from cmars/chore/semantic-release
Browse files Browse the repository at this point in the history
chore: set up semantic release for the npm package
  • Loading branch information
cmars authored Dec 16, 2021
2 parents 0ad9173 + 088da87 commit ad00913
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ version: 2.1
defaults: &defaults
resource_class: small
working_directory: ~/vervet
docker:
- image: circleci/golang:1.16-node

jobs:
test:
<<: *defaults
docker:
- image: circleci/golang:1.16-node
steps:
- run:
name: Install spectral
Expand Down Expand Up @@ -55,12 +55,38 @@ jobs:
- run:
command: golangci-lint run -v ./...

release:
<<: *defaults
steps:
- checkout
- run:
name: Build package
command: ./scripts/dist.bash
- run:
name: Release package
command: cd dist; npx semantic-release -b main

workflows:
version: 2
test:
jobs:
- test:
name: Test
release:
jobs:
- test:
name: Test
filters:
branches:
only: 'main'
- release:
name: Release
context: nodejs-app-release
requires:
- Test
filters:
branches:
only: 'main'
lint:
jobs:
- lint:
Expand Down
3 changes: 3 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"branches": "main"
}

0 comments on commit ad00913

Please sign in to comment.