Skip to content

Commit

Permalink
feat(release): add semantic release and commitlint actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bniedermeyer committed Aug 23, 2021
1 parent 01ed6e7 commit 525f86c
Show file tree
Hide file tree
Showing 5 changed files with 5,993 additions and 1,979 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: commitlint
on: [pull_request, push]

jobs:
commitlint:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release
on: [workflow_dispatch]

jobs:
release:
name: Release
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Build Package
run: npm run build
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
run: npx semantic-release
18 changes: 18 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
branches: [
'main',
{name: 'next', channel: 'next', prerelease: 'beta'},
'+([0-9])?(.{+([0-9]),x}).x'
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
["@semantic-release/git", {
"assets": ["src/**/*.md", 'CHANGELOG.md', 'package.json', 'package-lock.json'],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
Loading

0 comments on commit 525f86c

Please sign in to comment.