Skip to content

Commit

Permalink
setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Sep 19, 2023
1 parent f306e16 commit 9aba4c7
Show file tree
Hide file tree
Showing 24 changed files with 707 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json linguist-language=JSON-with-Comments
2 changes: 2 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npx --no-install lint-staged
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: kazupon
Empty file added .github/ISSUE_TEMPLATE/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- DO NOT IGNORE THE TEMPLATE!
Thank you for contributing!
Before submitting the PR, please make sure you do the following:
- Read the [Contributing Guide](https://github.com/intlify/utils/blob/main/CONTRIBUTING.md).
- Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
- Ideally, include relevant tests that fail without this PR but pass with it.
-->

### Description

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Linked Issues

### Additional context

<!-- e.g. is there anything you'd like reviewers to focus on? -->
87 changes: 87 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
- name: feature
description: Includes new features
color: 'ffff00'
- name: bug
description: Includes new features
color: 'ee0701'
- name: improvement
description: Includes backwards-compatible fixes
color: '1d76db'
- name: breaking
description: Includes backwards-incompatible fixes
color: 'b60205'
- name: refactoring
description: A code change that neither fixes a bug nor adds a feature
color: 'fbca04'
- name: security
description: Security fixes
color: 'b60205'
- name: documentation
description: Includes documetation fixes
color: '5319e7'
- name: example
description: Includes example and demo code fixes
color: 'db0875'
- name: deprecated
description: Includes deprecate fixes
color: 'f7ffa8'
- name: performance
description: Includes performance fixes
color: 'cc317c'
- name: i18n
description: Includes internationalization fixes
color: 'ffd412'
- name: a11y
description: Inlucdes accessibility fixes
color: '0000ff'
- name: dependency
description: Includes dependency fixes
color: 'ffbce7'
- name: todo
description: todo tasks
color: 'c2e0c6'
- name: duplicate
description: This issue or Pull Request already exists
color: 'ededed'
- name: help wanted
description: Extra attention is needed
color: 'e99695'
- name: good first issue
description: Good for newcomers
color: '7057ff'
- 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: proposal'
description: Request for comments
color: 'd4c5f9'
- name: 'status: pull request welcome'
description: Welcome to Pull Request
color: '2E7733'
- name: 'status: review needed'
description: Request for review
color: 'fbca04'
- name: 'status: need more repro codes or info'
description: Lacks enough info to make progress
color: 'F9C90A'
- 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'
45 changes: 45 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
- renovate[bot]
categories:
- title: 🌟 Features
labels:
- feature
- title: 🐛 Bug Fixes
labels:
- bug
- title: 💥 Breaking Changes
labels:
- breaking
- title: ⚠️ Deprecated Features
labels:
- deprecated
- title: ⚡ Improvement Features
labels:
- improvement
- title: 🔒 Security Fixes
labels:
- security
- title: 📈 Performance Fixes
labels:
- performance
- title: 📝️ Documentations
labels:
- documentation
- title: 👕 Refactoring
labels:
- refactoring
- title: 🍭 Examples
labels:
- example
- title: 🌐 ♿ Internationalization or Accessibility Fixes
labels:
- a11y
- i18n
- title: 🪄 Others
labels:
- chore
150 changes: 150 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Lint
strategy:
matrix:
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout codes
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Lint codes
run: deno lint

build:
name: Build
strategy:
matrix:
os: [ubuntu-latest]
node: [18.x]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout codes
uses: actions/checkout@v4

- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Setup bun
uses: oven-sh/setup-bun@v1

- name: Enable corepack
run: corepack enable

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: bun install

- name: Build codes
run: npm run build

test:
name: Test
strategy:
matrix:
os: [ubuntu-latest]
node: [18.x]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout codes
uses: actions/checkout@v4

- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Setup bun
uses: oven-sh/setup-bun@v1

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Enable corepack
run: corepack enable

- name: Install dependencies
run: bun install

- name: Build codes
run: npm test

edge-release:
name: Edge Release
needs:
- lint
- build
- test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
steps:
- name: Checkout codes
uses: actions/checkout@v4

- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Setup bun
uses: oven-sh/setup-bun@v1

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Enable corepack
run: corepack enable

- name: Install dependencies
run: bun install

- name: Build
run: npm run build

- name: Release Edge
if: |
github.event_name == 'push' &&
!startsWith(github.event.head_commit.message, '[skip-release]') &&
!startsWith(github.event.head_commit.message, 'chore') &&
!startsWith(github.event.head_commit.message, 'release') &&
!startsWith(github.event.head_commit.message, 'docs')
run: ./scripts/release.sh
env:
NPM_TOKEN: ${{secrets.NPM_ORG_TOKEN}}
EDGE_RELEASE: 'true'
16 changes: 16 additions & 0 deletions .github/workflows/github-label-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Label sync

on:
push:
branches:
- main
paths:
- .github/labels.yml
- .github/workflows/github-label-sync.yml
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: r7kamura/github-label-sync-action@v0
Loading

0 comments on commit 9aba4c7

Please sign in to comment.