Skip to content

Commit

Permalink
Setup semantic-release.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Apr 2, 2021
1 parent a90cf40 commit 7e4f1f0
Show file tree
Hide file tree
Showing 8 changed files with 2,528 additions and 58 deletions.
23 changes: 0 additions & 23 deletions .circleci/config.yml

This file was deleted.

22 changes: 21 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build

on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
Expand All @@ -27,3 +28,22 @@ jobs:
run: yarn test
env:
CI: true

release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install
run: yarn install
- name: Release
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Lint

on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Validate PR Title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
validate_pr_title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .npmignore

This file was deleted.

10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"prettier": "prettier --write {src,tests}/**/*.ts",
"prettier:check": "prettier --list-different {src,tests}/**/*.ts"
},
"files": [
"build"
],
"keywords": [],
"author": "",
"license": "ISC",
Expand All @@ -24,13 +27,20 @@
"@nestjs/common": "^7.0.9",
"@nestjs/core": "^7.0.9",
"@nestjs/microservices": "^7.0.9",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.2.0",
"@semantic-release/npm": "^7.1.0",
"@semantic-release/release-notes-generator": "^9.0.2",
"@types/jest": "^24.0.11",
"@types/node": "^10.7.0",
"grpc": "^1.24.4",
"jest": "^25.1.0",
"prettier": "^2.0.5",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.5",
"semantic-release": "^17.4.2",
"ts-jest": "^25.2.1",
"ts-node": "^8.3.0",
"typescript": "^3.9.3",
Expand Down
11 changes: 11 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
branches: ['main'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
'@semantic-release/npm',
'@semantic-release/github',
'@semantic-release/git',
],
};
Loading

0 comments on commit 7e4f1f0

Please sign in to comment.