Skip to content

Commit

Permalink
chore: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shishkin committed Feb 17, 2023
1 parent 3756b25 commit 5b6989a
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
pull_request:

jobs:
ci:
name: CI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
Empty file added CHANGELOG.md
Empty file.
3 changes: 3 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
};
22 changes: 22 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
branches: ["main"],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
changelogFile: "CHANGELOG.md",
},
],
"@semantic-release/npm",
"@semantic-release/github",
[
"@semantic-release/git",
{
assets: ["CHANGELOG.md"],
message: "chore(release): ${nextRelease.version} [skip ci]",
},
],
],
};

0 comments on commit 5b6989a

Please sign in to comment.