DevOps / Scripts yaml Intermediate

GitHub Actions Semantic Release

Automate version bumps and changelogs with semantic-release on every main push.

yaml
name: Release
on:
  push:
    branches: [main]
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0, token: "${{ secrets.GH_TOKEN }}" }
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Prerequisites

  • semantic-release
  • GitHub repository

Pro Tips

  • → Configure .releaserc.json for custom branches and plugins.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
yaml
Level
Intermediate
Read time
4 min
Published
Jun 2025
License
Commercial License

Newsletter

New modules every week, directly to your inbox.