Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: conventional commits #11

Merged
merged 4 commits into from
Feb 12, 2025
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
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: CI
on: [pull_request]
on:
pull_request:
branches: [main, develop]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release
on:
push:
branches: ['main', 'release/*']
jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
packages: write
pull-requests: write
id-token: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}
- uses: actions/checkout@v3
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- run: npm install
- run: npm run release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Merge Release -> Trunk
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
if: github.ref == 'refs/heads/release/1.x'
with:
type: now
from_branch: release/1.x
target_branch: main
github_token: ${{ steps.app-token.outputs.token }}
- name: Build documentation
run: npm run typedoc
- name: Publish to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: |
pages deploy docs --project-name ${{ secrets.CF_PROJECT_NAME }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docs
.idea
dist/*
!dist/esm
dist/esm/*
Expand Down Expand Up @@ -105,9 +107,8 @@ out
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
# vuepress v2.x temp
.temp
.cache

# Docusaurus cache and generated files
.docusaurus
Expand Down
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@


## Release Workfow

```mermaid
---
title: Git Flow
---

gitGraph
commit tag: "0.37.0"
branch dev
checkout dev
branch "feat/add-foo-123"
checkout "feat/add-foo-123"
commit id: "feat(foo): ..."
commit id: "doc(foo): ..."
checkout dev
branch "feat/add-bar-123"
checkout dev
branch "feat/add-baz-123"
checkout dev
merge "feat/add-foo-123" tag: "v1.0.0.beta.1"
checkout feat/add-bar-123
commit id: "chore(baz): ..."
commit id: "feat(baz): ..."
checkout dev
merge feat/add-bar-123 tag: "v1.0.0.beta.2"
checkout main
merge dev type: HIGHLIGHT tag: "v1.0.0"
checkout dev
merge main tag: "v1.0.0"
checkout "feat/add-baz-123"
commit id: "doc(bar): ..."
checkout dev
merge "feat/add-baz-123" tag: "v1.1.0-beta.1"
checkout main
merge dev type: HIGHLIGHT tag: "v1.1.0"

```
Loading