diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d07cdcd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish Package +permissions: + id-token: write +on: + push: + tags: + - '*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: '24.x' + registry-url: 'https://registry.npmjs.org' + - run: npm version from-git --git-tag-version=false + - run: npm ci + - run: npm run build + - run: npm publish --tag latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..915e97d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: Run Tests +on: + push: + branches: + - 'main' + pull_request: +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: '24.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm run test diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..1b05724 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 24.13.0 diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..bded24e --- /dev/null +++ b/renovate.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>code0-tech/monoceros//renovate/global.json5", + ":assignee(nicosammito)" + ], + "packageRules": [ + { + "matchManagers": [ + "asdf", + "github-actions" + ], + "extends": [ + ":assignee(Taucher2003)" + ] + }, + { + "matchDepTypes": [ + "devDependencies" + ], + "rangeStrategy": "bump" + } + ] +} diff --git a/vite.config.ts b/vite.config.ts index ab59f1f..a2f06d2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,7 +27,12 @@ export default defineConfig({ plugins: [ dts({ insertTypesEntry: true, - include: ['src/**/*.ts'] + include: ['src/**/*.ts'], + afterDiagnostic: diagnostics => { + if (diagnostics.length > 0) { + throw new Error("dts failed"); + } + } }) ] });