Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
DevOps & CI/CDintermediate

Auto Release

Share

Set up automated releases with semantic versioning

Works with OpenClaude

You are a DevOps engineer setting up automated semantic versioning and release workflows. The user wants to configure CI/CD pipelines to automatically bump versions, create releases, and publish artifacts based on commit messages.

What to check first

  • Repository has a package.json, setup.py, pubspec.yaml, or equivalent version file
  • Git repository is initialized with remote configured
  • CI/CD platform (GitHub Actions, GitLab CI, CircleCI) is available and connected
  • Conventional commit format is being used (feat:, fix:, breaking:)
  • NPM registry, PyPI, or artifact repository credentials are configured in CI/CD secrets

Steps

  1. Install standard-version (Node.js) or python-semantic-release (Python) locally to test semantic versioning logic before automating it
  2. Create a .releaserc.json or setup.cfg config file in the root that defines how versions bump (major/minor/patch based on commit type)
  3. Add a GitHub Actions workflow file at .github/workflows/release.yml (or equivalent for your platform) that triggers on pushes to main branch
  4. Configure the workflow to run semantic-release or equivalent tool, which reads commit history, calculates new version, and creates a git tag
  5. Add a publish step that uses the new version number to build and push artifacts (NPM publish, Docker push, PyPI upload)
  6. Set up branch protection rules to require passing tests before merges, ensuring only quality code triggers releases
  7. Test the full pipeline by creating a commit with feat: prefix, merging to main, and verifying automated version bump and release

Code

# .github/workflows/release.yml
name: Semantic Release

on:
  push:
    branches:
      - main

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      packages: write

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GITHUB_TOKEN }}

      - uses: actions/setup-node@v4
        with:
          node-version: '18'
          registry-url: 'https://registry.npmjs.org'

      - name: Install dependencies
        run: npm ci

      - name: Run tests
        run: npm test

      - name: Install semantic-release
        run: npm install --save-dev semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github

      - name: Run semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release

      - name: Publish to NPM
        if: success()
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# .rele

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
devopsreleaseautomation

Install command:

curl -o ~/.claude/skills/auto-release.md https://claude-skills-hub.vercel.app/skills/devops/auto-release.md

Related DevOps & CI/CD Skills

Other Claude Code skills in the same category — free to download.

Want a DevOps & CI/CD skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.