-
Notifications
You must be signed in to change notification settings - Fork 0
readme #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readme #51
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,107 +1,32 @@ | ||||||||
| # Auto-release when a PR with version bump is merged to main | ||||||||
| # Creates GitHub Release with changelog and publishes to npm | ||||||||
| # Semantic Release: Auto-version and publish on merge to main | ||||||||
| # Analyzes conventional commits to determine version bump: | ||||||||
| # feat: → minor (0.x.0) | ||||||||
| # fix:/perf:/refactor: → patch (0.0.x) | ||||||||
| # BREAKING CHANGE: → major (x.0.0) | ||||||||
|
|
||||||||
| name: Release on PR Merge | ||||||||
| name: Release | ||||||||
|
|
||||||||
| on: | ||||||||
| pull_request: | ||||||||
| types: [closed] | ||||||||
| push: | ||||||||
| branches: [main] | ||||||||
|
|
||||||||
| jobs: | ||||||||
| check-version: | ||||||||
| if: github.event.pull_request.merged == true | ||||||||
| runs-on: ubuntu-latest | ||||||||
| outputs: | ||||||||
| version_changed: ${{ steps.version-check.outputs.changed }} | ||||||||
| new_version: ${{ steps.version-check.outputs.version }} | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| with: | ||||||||
| fetch-depth: 2 | ||||||||
|
|
||||||||
| - name: Check if version changed | ||||||||
| id: version-check | ||||||||
| run: | | ||||||||
| # Get version from current commit | ||||||||
| NEW_VERSION=$(node -p "require('./package.json').version") | ||||||||
|
|
||||||||
| # Get version from previous commit | ||||||||
| git checkout HEAD~1 -- package.json 2>/dev/null || true | ||||||||
| OLD_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0") | ||||||||
|
|
||||||||
| # Restore current package.json | ||||||||
| git checkout HEAD -- package.json | ||||||||
|
|
||||||||
| echo "Old version: $OLD_VERSION" | ||||||||
| echo "New version: $NEW_VERSION" | ||||||||
|
|
||||||||
| if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then | ||||||||
| echo "Version changed from $OLD_VERSION to $NEW_VERSION" | ||||||||
| echo "changed=true" >> $GITHUB_OUTPUT | ||||||||
| echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT | ||||||||
| else | ||||||||
| echo "Version unchanged" | ||||||||
| echo "changed=false" >> $GITHUB_OUTPUT | ||||||||
| fi | ||||||||
|
|
||||||||
| release: | ||||||||
|
||||||||
| release: | |
| release: | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" |
Copilot
AI
Feb 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
persist-credentials: false disables the default GitHub token git credential setup from actions/checkout. Since this workflow runs semantic-release with the @semantic-release/git plugin (committing and pushing CHANGELOG/package updates) and tags, the job will likely fail when it tries to git push unless you reconfigure the origin remote with an auth token (or remove persist-credentials: false).
| persist-credentials: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "branches": ["main"], | ||
| "plugins": [ | ||
| ["@semantic-release/commit-analyzer", { | ||
| "preset": "conventionalcommits", | ||
| "releaseRules": [ | ||
| { "type": "feat", "release": "minor" }, | ||
| { "type": "fix", "release": "patch" }, | ||
| { "type": "perf", "release": "patch" }, | ||
| { "type": "refactor", "release": "patch" }, | ||
| { "type": "docs", "release": false }, | ||
| { "type": "style", "release": false }, | ||
| { "type": "chore", "release": false }, | ||
| { "type": "test", "release": false }, | ||
| { "type": "ci", "release": false } | ||
| ] | ||
| }], | ||
| ["@semantic-release/release-notes-generator", { | ||
| "preset": "conventionalcommits", | ||
| "presetConfig": { | ||
| "types": [ | ||
| { "type": "feat", "section": "Features" }, | ||
| { "type": "fix", "section": "Bug Fixes" }, | ||
| { "type": "perf", "section": "Performance" }, | ||
| { "type": "refactor", "section": "Refactoring" }, | ||
| { "type": "docs", "section": "Documentation", "hidden": true }, | ||
| { "type": "chore", "section": "Maintenance", "hidden": true }, | ||
| { "type": "test", "section": "Tests", "hidden": true } | ||
| ] | ||
| } | ||
| }], | ||
| ["@semantic-release/changelog", { | ||
| "changelogFile": "CHANGELOG.md", | ||
| "changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)." | ||
| }], | ||
| "@semantic-release/npm", | ||
| "@semantic-release/github", | ||
| ["@semantic-release/git", { | ||
| "assets": ["CHANGELOG.md", "package.json", "package-lock.json"], | ||
| "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
| }] | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is titled "readme" but it also introduces semantic-release configuration and replaces the release/publish GitHub Actions workflows. Please update the PR title/description to reflect the release automation changes so reviewers know to focus on CI/release behavior too.