diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dc4358..5e0eb8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,24 +2,10 @@ name: CI on: push: - branches: ['**'] + branches: [main] pull_request: branches: [main] jobs: build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '24' - - - name: Install dependencies - run: npm install - - - name: Run build - run: npm run build + uses: starweb-libs/.github/.github/workflows/build.yml@v1.0.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7fed609..0562c97 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,30 +6,12 @@ on: - 'v*' jobs: + build: + uses: starweb-libs/.github/.github/workflows/build.yml@v1.0.0 + publish: - runs-on: ubuntu-latest + needs: build permissions: contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '24' - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm install - - - name: Publish to npm - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true + uses: starweb-libs/.github/.github/workflows/publish.yml@v1.0.0 + secrets: inherit diff --git a/README.md b/README.md index 39295c8..53ae6ee 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Canvas UI primitives for browser games +[![CI](https://github.com/starweb-libs/ui/actions/workflows/ci.yml/badge.svg)](https://github.com/starweb-libs/ui/actions/workflows/ci.yml) +[![Library Version](https://img.shields.io/npm/v/@starweb-libs/ui)](https://www.npmjs.com/package/@starweb-libs/ui) +[![License: MIT](https://img.shields.io/badge/License-MIT-green)](./LICENSE) + ## Tech Stack

diff --git a/package.json b/package.json index cc32e10..ba56ae6 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "tsdown": "^0.22.0" }, "scripts": { + "typecheck": "tsc --noEmit", "build": "tsdown", "prepare": "npm run build" },