mirror of
https://github.com/ryanwtf7/hianime-api.git
synced 2026-04-17 21:41:44 +00:00
feat: align workflows with CoorenLabs patterns (separate checks/release and build)
This commit is contained in:
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
@@ -8,11 +8,54 @@ on:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.gitignore'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
quality-checks:
|
||||
name: Code Quality & Security
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.bun/install/cache
|
||||
node_modules
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock', '**/package.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Run linter
|
||||
run: bun run lint
|
||||
|
||||
- name: Check code formatting
|
||||
run: bunx prettier --check .
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run tests
|
||||
run: bun run test:all
|
||||
|
||||
release:
|
||||
name: Tag and Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: quality-checks
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
|
||||
Reference in New Issue
Block a user