Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
ci: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdef1cafe committed Sep 20, 2021
1 parent 92a23ff commit d0024e8
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: commitlint/lint/test/build
name: Commitlint Lint Test & Build

on:
pull_request:
Expand All @@ -14,6 +14,8 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check PR title
run: echo ${{ github.event.pull_request.title }} | npx commitlint
- name: Commit lint
uses: wagoid/commitlint-github-action@v4
- name: Cache dependencies
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- main
- semantic-release # REMOVE THIS

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile
# - name: Type check
# run: yarn type-check
# - name: Lint
# run: yarn lint
# - name: Test
# run: yarn test
- name: Build
run: yarn build
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn release
11 changes: 9 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"branches": "develop",
"dryRun": true,
"branches": ["main", "semantic-release"],
"repositoryUrl": "https://github.com/shapeshift/lib",
"debug": "true",
"plugins": [
"@semantic-release/commit-analyzer",
["@semantic-release/commit-analyzer", {
"preset": "angular",
"releaseRules": [
{ "type": "chore", "release": "patch" },
{ "type": "test", "release": "patch" }
]
}],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
Expand Down
Empty file added CHANGELOG.md
Empty file.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"test": "jest",
"test:dev": "jest --watch",
"type-check": "lerna run type-check",
"release": "lerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo",
"publish:lerna": "lerna publish from-package --no-private --yes",
"version:patch": "lerna version patch --yes --no-git-tag-version --no-push",
"version:minor": "lerna version minor --yes --no-git-tag-version --no-push",
Expand Down

0 comments on commit d0024e8

Please sign in to comment.