👷 added in lefthook, commitlint, and semantic-release
This commit is contained in:
parent
2e62c38ff2
commit
be3058d17a
7 changed files with 4601 additions and 14 deletions
|
|
@ -1,13 +1,18 @@
|
|||
name: Build Docker Image
|
||||
on:
|
||||
push:
|
||||
branches: [devel]
|
||||
branches:
|
||||
- "**"
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
jobs:
|
||||
build:
|
||||
build-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Docker Metadata
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v5
|
||||
|
|
@ -17,6 +22,9 @@ jobs:
|
|||
type=ref,event=branch
|
||||
type=sha,prefix=
|
||||
type=edge,branch=devel
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
- name: Docker Buildx
|
||||
uses: https://code.forgejo.org/docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Registry
|
||||
27
.forgejo/workflows/semver.yml
Normal file
27
.forgejo/workflows/semver.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Semver
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
jobs:
|
||||
semver:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:21-alpine
|
||||
steps:
|
||||
- name: Setup Node
|
||||
run: |
|
||||
apk add --no-cache libc6-compat
|
||||
apk update
|
||||
yarn set version canary
|
||||
yarn config set nodeLinker node-modules
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: yarn install
|
||||
run: yarn install
|
||||
- name: Semver
|
||||
run: yarn run semantic-release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
7
commitlint.config.ts
Normal file
7
commitlint.config.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
extends: ["gitmoji"],
|
||||
rules: {
|
||||
"type-empty": [0, "never"],
|
||||
"subject-empty": [0, "never"],
|
||||
},
|
||||
};
|
||||
10
lefthook.yml
Normal file
10
lefthook.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
"biome lint":
|
||||
run: yarn lint
|
||||
|
||||
commit-msg:
|
||||
commands:
|
||||
"lint commit message":
|
||||
run: yarn run commitlint --edit {1}
|
||||
10
package.json
10
package.json
|
|
@ -18,12 +18,17 @@
|
|||
"scripts": {
|
||||
"dev": "tsx ./src/main.ts",
|
||||
"lint": "biome ci ./src/**/*",
|
||||
"build": "pkgroll"
|
||||
"build": "pkgroll",
|
||||
"postinstall": "lefthook install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.7.1",
|
||||
"@types/node": "20.12.7",
|
||||
"commitlint": "^19.5.0",
|
||||
"commitlint-config-gitmoji": "^2.3.1",
|
||||
"lefthook": "^1.7.18",
|
||||
"pkgroll": "2.0.2",
|
||||
"semantic-release-gitmoji": "^1.6.8",
|
||||
"tsx": "4.7.2",
|
||||
"typescript": "5.4.5"
|
||||
},
|
||||
|
|
@ -31,6 +36,7 @@
|
|||
"@atproto/api": "0.12.5",
|
||||
"@hono/node-server": "1.11.0",
|
||||
"hono": "4.2.7",
|
||||
"ioredis": "5.4.1"
|
||||
"ioredis": "5.4.1",
|
||||
"semantic-release": "^24.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
35
release.config.mjs
Normal file
35
release.config.mjs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* @type {import('semantic-release').GlobalConfig}
|
||||
*/
|
||||
export default {
|
||||
branches: ["main", { name: "devel", prerelease: true }],
|
||||
plugins: [
|
||||
[
|
||||
"semantic-release-gitmoji",
|
||||
{
|
||||
releaseRules: {
|
||||
major: [":boom:"],
|
||||
minor: [":sparkles:"],
|
||||
patch: [
|
||||
":bug:",
|
||||
":ambulance:",
|
||||
":lipstick:",
|
||||
":lock:",
|
||||
":zap:",
|
||||
":chart_with_upwards_trend:",
|
||||
":globe_with_meridians:",
|
||||
":alien:",
|
||||
":wheelchair:",
|
||||
":mag:",
|
||||
":children_crossing:",
|
||||
":speech_balloon:",
|
||||
":iphone:",
|
||||
":pencil2:",
|
||||
":bento:",
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
"@semantic-release/github",
|
||||
],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue