Skip to content

Commit

Permalink
feat: add semantic release (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Notekunn authored Nov 7, 2022
1 parent 1f5c5f9 commit 59f99d7
Show file tree
Hide file tree
Showing 4 changed files with 2,120 additions and 42 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🚀

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v2.1.5
with:
node-version: '16'
- name: Build
run: yarn && yarn build
env:
NODE_AUTH_TOKEN: ${ github.token }}
- name: Release
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
npx semantic-release
env:
GH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ github.token }}
27 changes: 27 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Nest boilerplate changelog"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json"]
}
],
"@semantic-release/github"
]
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.6",
"@semantic-release/npm": "^9.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@types/express": "^4.17.13",
"@types/jest": "28.1.8",
"@types/node": "^16.0.0",
Expand All @@ -50,6 +56,7 @@
"jest": "28.1.3",
"lint-staged": "^13.0.3",
"prettier": "^2.3.2",
"semantic-release": "^19.0.5",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "28.0.8",
Expand Down
Loading

0 comments on commit 59f99d7

Please sign in to comment.