-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add CI and release flow with github actions
- Loading branch information
Showing
6 changed files
with
400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
- name: 'Type: A11y' | ||
description: An accessibility fixes | ||
color: '#0000ff' | ||
- name: 'Type: Breaking' | ||
description: Includes backwards-incompatible fixes | ||
color: '#b60205' | ||
- name: 'Type: Bug' | ||
description: Bug or Bug fixes | ||
color: '#ee0701' | ||
- name: 'Type: Build' | ||
description: A packaging or a building fixes | ||
color: '#5319e7' | ||
- name: 'Type: Dependency' | ||
description: Dependencies fixes | ||
color: '#ffbce7' | ||
- name: 'Type: Deprecated' | ||
description: Includes deprecate fixes | ||
color: '#f7ffa8' | ||
- name: 'Type: Documentation' | ||
description: A documetation fixes | ||
color: '#5319e7' | ||
- name: 'Type: Example' | ||
description: Includes example and demo code fixes | ||
color: '#db0875' | ||
- name: 'Type: Feature' | ||
description: Includes new features | ||
color: '#ffff00' | ||
- name: 'Type: I18n' | ||
description: An internationalization fixes | ||
color: '#ffd412' | ||
- name: 'Type: Improvement' | ||
description: Includes backwards-compatible fixes | ||
color: '#1d76db' | ||
- name: 'Type: Maintenance' | ||
description: Repository Maintenance | ||
color: '#e5ef7a' | ||
- name: 'Type: Performance' | ||
description: Includes performance fixes | ||
color: '#cc317c' | ||
- name: 'Type: Refactoring' | ||
description: A code change that neither fixes a bug nor adds a feature | ||
color: '#fbca04' | ||
- name: 'Type: Security' | ||
description: Security fixes | ||
color: '#b60205' | ||
- name: 'Type: Testing' | ||
description: Adding missing tests or correcting existing tests | ||
color: '#0e8a16' | ||
- name: typescript | ||
color: '#106FDF' | ||
- name: workaround | ||
color: '#026172' | ||
- name: todo | ||
color: '#c2e0c6' | ||
- name: tips | ||
color: '#fbca04' | ||
- name: duplicate | ||
description: This issue or Pull Request already exists | ||
color: '#ededed' | ||
- name: good first issue | ||
description: Good for newcomers | ||
color: '#7057ff' | ||
- name: help wanted | ||
description: Extra attention is needed | ||
color: '#e99695' | ||
- name: release | ||
color: '#581fba' | ||
- name: 'Status: Abandoned' | ||
description: The issue or Pull Request is wontfix | ||
color: '#000000' | ||
- name: 'Status: Blocked' | ||
description: Progress on the issue is Blocked | ||
color: '#ee0701' | ||
- name: 'Status: In Progress' | ||
description: Work in Progress | ||
color: '#cccccc' | ||
- name: 'Status: Need More Info' | ||
description: Lacks enough info to make progress | ||
color: '#F9C90A' | ||
- name: 'Status: PR Welcome' | ||
description: Welcome to Pull Request | ||
color: '#2E7733' | ||
- name: 'Status: Proposal' | ||
description: Request for comments | ||
color: '#d4c5f9' | ||
- name: 'Status: Review Needed' | ||
description: Request for review comments | ||
color: '#fbca04' | ||
- name: 🧹 p1-chore | ||
description: 'Priority 1: no change in change code behavior' | ||
color: '#FDDFD7' | ||
- name: 🍰 p2-nice-to-have | ||
description: "Priority 2: nothing is broken but it's worth addressing" | ||
color: '#0e8a16' | ||
- name: 🔨 p3-minor-bug | ||
description: 'Priority 3: a bug in an edge case that only affects very specific usage' | ||
color: '#fbca04' | ||
- name: ❗ p4-important | ||
description: 'Priority 4: bugs that violate documented behavior, or significantly impact perf' | ||
color: '#d93f0b' | ||
- name: 🔥 p5-urgent | ||
description: 'Priority 5: build-breaking bugs that affect most users and should be fixed ASAP' | ||
color: '#ee0701' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- octocat | ||
- renovate[bot] | ||
- dependabot[bot] | ||
categories: | ||
- title: 🌟 Features | ||
labels: | ||
- feature | ||
- 'Type: Feature' | ||
- title: 🐛 Bug Fixes | ||
labels: | ||
- bug | ||
- 'Type: Bug' | ||
- title: 💥 Breaking Changes | ||
labels: | ||
- breaking | ||
- 'Type: Breaking' | ||
- title: ⚠️ Deprecated Features | ||
labels: | ||
- deprecated | ||
- 'Type: Deprecated' | ||
- title: ⚡ Improvement Features | ||
labels: | ||
- improvement | ||
- 'Type: Improvement' | ||
- title: 🔒 Security Fixes | ||
labels: | ||
- security | ||
- 'Type: Security' | ||
- title: 📈 Performance Fixes | ||
labels: | ||
- performance | ||
- 'Type: Performance' | ||
- title: 📝️ Documentations | ||
labels: | ||
- documentation | ||
- 'Type: Documentation' | ||
- title: 👕 Refactoring | ||
labels: | ||
- refactoring | ||
- 'Type: Refactoring' | ||
- title: 🍭 Examples | ||
labels: | ||
- example | ||
- 'Type: Example' | ||
- title: 🌐 ♿ Internationalization or Accessibility Fixes | ||
labels: | ||
- a11y | ||
- i18n | ||
- 'Type: I18n' | ||
- 'Type: A11y' | ||
- title: 🪄 Others | ||
labels: | ||
- chore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
env: | ||
CI: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Lint codes | ||
run: pnpm lint | ||
|
||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
node: [18] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Cache dist | ||
uses: actions/cache@v4 | ||
with: | ||
path: packages/*/dist | ||
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }} | ||
|
||
unittest: | ||
name: Unit test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
node: [18.19, 20, 22] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Run unit tests | ||
run: | | ||
pnpm test | ||
typecheck: | ||
name: Type checking | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Run type checking | ||
run: pnpm typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Label sync | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- .github/labels.yml | ||
- .github/workflows/github-label-sync.yml | ||
# eslint-disable-next-line yml/no-empty-mapping-value | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: r7kamura/github-label-sync-action@v0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- 'v*' | ||
env: | ||
NODE_OPTIONS: --max-old-space-size=6144 | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Extract version tag | ||
if: startsWith( github.ref, 'refs/tags/v' ) | ||
uses: jungwinter/split@v2 | ||
id: split | ||
with: | ||
msg: ${{ github.ref }} | ||
separator: / | ||
|
||
- name: Create Github Release | ||
run: gh release create ${{ steps.split.outputs._2 }} --generate-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Generate changelog | ||
run: npx gh-changelogen --repo=inclusion-vapor --tag=${{ steps.split.outputs._2 }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit changelog | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
branch: master | ||
file_pattern: '*.md' | ||
commit_message: 'chore: sync changelog' | ||
|
||
- name: Publish package | ||
run: | | ||
./scripts/release.sh | ||
env: | ||
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} |
Oops, something went wrong.