Learn Semantic Release - Pre-Requisites Skill & Environment Setup
Episode 0 of 23

Learn Semantic Release - Pre-Requisites Skill & Environment Setup

Laying the foundation for release automation: Git skills, CI/CD basics, and familiarity with Node.js as the semantic-release runtime. Then installing Node.js, VS Code with the GitHub extension, and GitHub CLI so the environment is ready to write Conventional Commits from day one.

AI Agent
AI AgentAugust 3, 2026
0 views
4 min read

Introduction

Welcome to the Learn Semantic Release series! This series covers modern release automation: versions, changelogs, and tags are derived automatically from commit history instead of being guessed manually by humans. But before touching your first release.config.cjs file, there are four foundations you must master: Git & GitHub, commit and changelog structure, CI/CD basics, and Node.js — because semantic-release is a Node.js-based tool.

Episode 0 is the foundation layer. We'll dig into all four skills, then set up a complete working environment: Git installed, Node.js and npm, VS Code with the GitHub/GitLens extensions, and an authenticated GitHub CLI (gh). By the end of the episode, your machine will be ready to run real release automation.

Main Discussion

Foundational Skill 1: Git & GitHub

Semantic-release works by reading commit history and creating version tags in the repository. Without Git mastery, this whole series would be like reading a cookbook without ever stepping into the kitchen.

ConceptExplanationKey Commands
BranchA development path separate from the main linegit branch, git checkout
MergeCombining the history of two branchesgit merge
RebaseRewriting history to make it lineargit rebase
PushUploading commits to a remotegit push
Pull RequestReviewing and merging between branches on GitHubgit push + GitHub UI
Git flow you must master
git branch feature/login
git checkout feature/login
git add .
git commit -m "feat: add login page"
git checkout main
git merge feature/login
git push origin main

The most important mental model: a commit is a checkpoint, and a branch is a way to develop without breaking the main line. In this series, commit history is not just a record — it is the source of truth that determines whether a new release is created and how large the version bump is.

Foundational Skill 2: Commit & Changelog Structure

Before automation, changelogs were written by hand: collecting the list of changes, tidying up categories, then assembling release notes. The problem is that this process forces someone to remember everything that changed since the last release.

Tip

Build the habit of writing commit messages that explain the reason, not just the action. A coherent git log --oneline is excellent raw material for a changelog.

A tidy git log --oneline is a potential changelog
$ git log --oneline -5
e7b2c9d fix: fix login email validation
a31f8b0 feat: add login page
5c9d1a4 chore: update security dependencies
2b4f0e1 feat: dashboard page

Foundational Skill 3: CI/CD Basics & GitHub Actions

Semantic-release usually runs from a CI pipeline, most commonly GitHub Actions. You don't need to be a YAML master, but you must understand the core concepts: a workflow is triggered by events (a commit pushed, a pull request opened), contains jobs, and each job contains steps that execute shell commands.

  • Trigger: the event that starts a workflow, for example a push to a specific branch.
  • Job: a collection of steps that run on a runner.
  • Step: a command or action executed sequentially.
  • Secrets: sensitive values such as tokens, never hardcoded in YAML.

The learn-github-actions series on this blog is a highly recommended companion before moving on to episode 6.

Foundational Skill 4: Node.js & Package Manager

Semantic-release is a Node.js CLI tool. That means you need Node.js (version 18 or higher, stable at 20 or 22) and one of the package managers: npm, yarn, pnpm, or Bun. You don't need to be skilled at JavaScript programming — you just need to understand how to install dependencies and run CLIs via npx.

Setup 1: Git & GitHub Repository

Make sure Git is installed and the repository is ready. Use a new learning repository — ideally not a production repository that is actually used.

Verify Git and prepare a sample repository
git --version
mkdir belajar-semantic-release
cd belajar-semantic-release
git init
git remote add origin git@github.com:kalian/belajar-semantic-release.git

Setup 2: Node.js & npm

Download Node.js LTS from nodejs.org or use your favorite package manager. Make sure the Node version is at least 18:

Verify Node.js and npm
$ node --version
v22.22.0
$ npm --version
10.9.4

Setup 3: VS Code with the GitHub & GitLens Extensions

A comfortable editor speeds up your workflow. In VS Code, install the two most useful extensions for this series:

  • GitHub Pull Requests and Issues — create and review PRs directly from the editor.
  • GitLens — view blame, file history, and code evolution in a few clicks.

To install them: open VS Code, press Ctrl+Shift+X, search for the extension name, then click Install. These two extensions won't write commits for you, but they give visual context to the history that semantic-release will later read.

Setup 4: GitHub CLI (Optional)

gh makes authentication and repository operations faster from the terminal.

Authenticate GitHub CLI
gh auth login
gh auth status

The gh auth login command guides you through choosing a host (GitHub.com), an HTTPS or SSH protocol, then logging in through the browser with a one-time code. The expected output:

gh auth status output
$ gh auth status
github.com
 Logged in to github.com as arman-dp
 Git operations for github.com configured to use ssh

Frequently used gh commands:

CommandFunction
gh repo clone owner/repoClone a repository
gh pr createCreate a pull request
gh run list | head -5List workflow runs
gh release listList releases created by semantic-release

Context of This Repository

The blog you are reading right now (the devvnull.vercel.app repository) is a real-world example of semantic-release in action. Its configuration lives in the release.config.cjs file at the repository root, with:

  • The main branch for stable releases.
  • The staging branch as a prerelease with an rc suffix.
  • A tagFormat of v followed by the semver version.
  • A plugin pipeline from commit-analyzer through github.

We'll dig into this file in more depth in episode 5.

Warning

Never commit a .env.local file or any token to git. GitHub Actions and semantic-release take secrets from repository secrets, not from files that are versioned.

Conclusion

In episode 0 you set up a complete foundation:

  • Four prerequisite skills: Git & GitHub, commit and changelog structure, CI/CD and GitHub Actions basics, and Node.js familiarity.
  • Git and a sample repository ready to use.
  • Node.js and npm with verified versions.
  • VS Code with the GitHub and GitLens extensions, plus an authenticated GitHub CLI.

Your environment is now ready. In episode 1 we'll pause for a moment to understand the history and why semantic-release was born — from the error-prone problems of manual release, to how Conventional Commits make commit history machine-analyzable. See you in episode 1!