diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cd57cbb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: ci + +permissions: + contents: read + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: {} + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: 📦 Install dependencies + run: pnpm install --frozen-lockfile + + - name: 🚧 Set up project + run: pnpm nuxi prepare + + - name: 📝 Lint + run: pnpm lint + + - name: 💪 Type check + run: pnpm typecheck diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5b3e64b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: npx changelogithub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sementic-pull-request.yml b/.github/workflows/sementic-pull-request.yml new file mode 100644 index 0000000..42a451d --- /dev/null +++ b/.github/workflows/sementic-pull-request.yml @@ -0,0 +1,24 @@ +name: Semantic Pull Request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: {} + +jobs: + main: + permissions: + pull-requests: read # to analyze PRs (amannn/action-semantic-pull-request) + statuses: write # to mark status of analyzed PR (amannn/action-semantic-pull-request) + + runs-on: ubuntu-latest + name: Semantic Pull Request + steps: + - name: Validate PR title + uses: amannn/action-semantic-pull-request@v5.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/eslint.config.js b/eslint.config.js index dc4a41f..64f05c1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,6 +4,8 @@ export default antfu({ stylistic: true, // enable stylistic formatting rules typescript: true, vue: true, + jsonc: true, + yaml: true, }, { rules: { // https://github.com/antfu/eslint-config/pull/214 diff --git a/package.json b/package.json index 07576cd..ad450f5 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "db:generate": "drizzle-kit generate:sqlite", "db:push": "drizzle-kit push:sqlite", "db:drop": "drizzle-kit drop", - "pwa:generate-assets": "pwa-assets-generator --preset minimal public/logo.png" + "pwa:generate-assets": "pwa-assets-generator --preset minimal public/logo.png", + "lint": "eslint --cache .", + "lint:fix": "eslint --cache --fix ." }, "devDependencies": { "@antfu/eslint-config": "latest",