Skip to content

Commit

Permalink
ci: add conventional commits and semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Oct 19, 2023
1 parent 108d57f commit 9ba9a1a
Show file tree
Hide file tree
Showing 6 changed files with 11,145 additions and 1,956 deletions.
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
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
push:
branches: [main, develop]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
packages: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
- run: npm ci
- run: npm run release
env:
NPM_CONFIG_REGISTRY: 'https://npm.pkg.github.com'
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge main -> develop
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
if: github.ref == 'refs/heads/main'
with:
type: now
from_branch: main
target_branch: develop
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
dist/*
!dist/esm
dist/esm/*
Expand Down Expand Up @@ -105,9 +106,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

0 comments on commit 9ba9a1a

Please sign in to comment.