diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..70aab6c --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,31 @@ +name: Quality + +on: + pull_request: # Run this workflow for all pull request changes + types: + - opened + - reopened + - synchronize + repository_dispatch: # Run this workflow when base branch updates + types: [base_branch_updated] + +jobs: + quality: + runs-on: ubuntu-latest + if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }} + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: 24 + registry-url: 'https://registry.npmjs.org' + - name: Update npm + run: npm install -g npm@latest + - name: Install dependencies + run: npm ci + env: + HUSKY: 0 # Disable husky within CI/CD + - name: Run quality checks + run: npm run quality + - name: Build project + run: npm run build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/release.yml similarity index 62% rename from .github/workflows/npm-publish.yml rename to .github/workflows/release.yml index b7c3612..0cd6576 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,19 @@ -name: Publish to NPM +name: Release on: push: branches: - - 'main' + - main permissions: id-token: write # Required for OIDC / NPM Trusted Publishing (https://repos.openssf.org/trusted-publishers-for-all-package-repositories) + issues: write contents: write + pull-requests: write jobs: - quality-bump-and-publish: + release: runs-on: ubuntu-latest - if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }} steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -21,28 +22,23 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Update npm run: npm install -g npm@latest # NPM Trusted Publishing requires npm 11.5.1 or later + - name: Install dependencies + run: npm ci + env: + HUSKY: 0 # Disable husky within CI/CD - name: Configure git run: | git config user.name "GitHub Actions Bot" git config user.email "github-actions-bot@users.noreply.github.com" - - name: Install npm dependencies - run: npm ci - env: - HUSKY: 0 - - name: Run quality checks - run: npm run quality + - uses: googleapis/release-please-action@v4 + with: + release-type: node - name: Build project + if: ${{ steps.release.outputs.release_created }} run: npm run build - - name: Run standard-version to bump version - run: npm run release - - name: Push version bump to main - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: main - tags: true - force: true - name: Bundle tarball + if: ${{ steps.release.outputs.release_created }} run: npm run package - name: Publish to npm + if: ${{ steps.release.outputs.release_created }} run: npm publish diff --git a/.npmrc b/.npmrc index 13f1904..214c29d 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -//registry.npmjs.org/ +registry=https://registry.npmjs.org/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 001cef2..d06bd45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -# Changelog +# CHANGELOG -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +All notable changes to this project will be documented in this file. ### 1.1.6 (2026-02-15)