Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Implements automated release and publish workflows using conventional commits for changelog generation and semantic versioning.

Standalone Scripts

scripts/release.sh - Complete release automation independent of GitHub Actions:

  • Runs tests and production build
  • Generates CHANGELOG.md from conventional commits via standard-version
  • Bumps version semantically and creates git tags
  • Supports major/minor/patch/prerelease

scripts/publish.sh - npm publishing with configurable authentication:

  • Supports NPM_TOKEN environment variable or npm login
  • Confirmation prompt before publish
  • Secure cleanup of temporary auth files

Both use set -euo pipefail for robust error handling.

GitHub Actions

Release Workflow - Manual trigger with release type selection:

  • Executes release.sh
  • Pushes changes and tags
  • Creates GitHub Release with generated changelog

Publish Workflow - Manual trigger with explicit confirmation:

  • Runs tests and build
  • Publishes to npm using NPM_TOKEN secret
  • Minimal permissions (contents: read)

Configuration

  • standard-version dependency for changelog automation
  • .versionrc.json maps commit types to changelog sections, hides chore commits
  • npm scripts for convenience (npm run release:minor, npm run publish:npm)
  • .npmrc added to .gitignore

Documentation

  • RELEASE.md - Complete guide covering conventional commits, workflows, and troubleshooting
  • README.md - Release process overview
  • CONTRIBUTING.md - Conventional commit guidelines

Usage

# Local release
git commit -m "feat: add new capability"
npm run release:minor
git push --follow-tags origin main

# Local publish
NPM_TOKEN=token npm run publish:npm

Scripts are CI/CD agnostic and work in any environment with npm, git, and node.

Original prompt

This section details on the original issue you should resolve

<issue_title>Build and Release Pipeline</issue_title>
<issue_description>This repository lack of a proper and automated test, build and release pipeleine.

Tasks:

  • There must be a release script. It must be triggered manually. The script must trigger
    • test
    • production build
    • release the package
    • and it will resolve changes from conventional commits and update CHANGELOG.md automatically for the release.
  • Second script is to publish the release to npm. The secrets for publishing must be configurable.

These scrips must be independent from Github Actions but will be used in Github Actions.

Also document this structure properly.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 10, 2025 20:23
- Add release.sh script for automated testing, building, and versioning
- Add publish.sh script for publishing to npm with configurable secrets
- Add GitHub Actions workflows for manual release and publish
- Add standard-version for automated changelog generation
- Add comprehensive RELEASE.md documentation
- Update README.md and CONTRIBUTING.md with release process info
- Add npm scripts for convenience (release, release:major, etc.)

Co-authored-by: erdigokce <17235148+erdigokce@users.noreply.github.com>
- Add pipefail and undefined variable checking to scripts
- Clarify publish confirmation prompt
- Hide chore commits from changelog (except release commits)
- Add explicit permissions to publish workflow
- Add .npmrc to .gitignore for security

Co-authored-by: erdigokce <17235148+erdigokce@users.noreply.github.com>
Copilot AI changed the title [WIP] Add build and release pipeline scripts Add automated release pipeline with conventional commits and standalone scripts Dec 10, 2025
Copilot AI requested a review from erdigokce December 10, 2025 20:33
@erdigokce erdigokce marked this pull request as ready for review December 10, 2025 20:34
@erdigokce erdigokce merged commit b9019e7 into master Dec 10, 2025
10 checks passed
@erdigokce erdigokce deleted the copilot/add-release-pipeline-scripts branch December 10, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build and Release Pipeline

2 participants