Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run lint
- run: bun test
- run: bun run build
- run: bun run validate
- run: bun run publint
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release

on:
push:
branches: [main]

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

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

steps:
- name: Generate release token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
token: ${{ steps.generate_token.outputs.token }}

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org

- name: Update npm to latest
run: npm install -g npm@latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint
run: bun run lint

- name: Test
run: bun test

- name: Build
run: bun run build

- name: Validate skills
run: bun run validate

- name: Publint
run: bun run publint

- name: Verify dependency signatures
run: npm audit signatures

- name: Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GIT_AUTHOR_NAME: TxnLab Release Bot[bot]
GIT_AUTHOR_EMAIL: txnlab-release-bot[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: TxnLab Release Bot[bot]
GIT_COMMITTER_EMAIL: txnlab-release-bot[bot]@users.noreply.github.com
run: npx semantic-release
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
node_modules/
skills/skill-creator/
CHANGELOG.md
60 changes: 60 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export default {
branches: ['main'],
tagFormat: 'v${version}',
plugins: [
'@semantic-release/commit-analyzer',
[
'@semantic-release/release-notes-generator',
{
preset: 'angular',
presetConfig: {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'refactor', section: 'Code Refactoring' },
{ type: 'perf', section: 'Performance Improvements' },
{ type: 'docs', section: 'Documentation', hidden: true },
{ type: 'style', section: 'Styles', hidden: true },
{ type: 'chore', section: 'Miscellaneous Chores', hidden: true },
{ type: 'test', section: 'Tests', hidden: true },
{ type: 'build', section: 'Build System', hidden: true },
{ type: 'ci', section: 'Continuous Integration', hidden: true },
],
},
writerOpts: {
commitsSort: false,
commitGroupsSort: (a, b) => {
const order = [
'Features',
'Bug Fixes',
'Code Refactoring',
'Performance Improvements',
]
const aIndex = order.indexOf(a.title)
const bIndex = order.indexOf(b.title)
if (aIndex === -1 && bIndex === -1) return 0
if (aIndex === -1) return 1
if (bIndex === -1) return -1
return aIndex - bIndex
},
},
},
],
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
},
],
'@semantic-release/npm',
'@semantic-release/github',
[
'@semantic-release/git',
{
assets: ['CHANGELOG.md', 'package.json'],
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
],
}
Loading