C.W.K.
Stream
Lesson 08 of 13 · published

Release 생성

~11 min · releases, tags, changelog

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Tag 기반 release pipeline

표준 release 모양: v1.4.2 같은 tag push, tag push 에 workflow 발사, release artifact 빌드, GitHub Releases / npm / PyPI / ghcr 게시, changelog 게시.

구성요소

  1. Tag — 로컬에서 git tag v1.4.2 && git push --tags 나 GitHub UI 로 생성.
  2. Release workflowon: push: tags: ['v*.*.*'] 청취.
  3. Build — release artifact 생산.
  4. Changelog — 자동 생성 (release-please, changesets, conventional-changelog) 또는 사람이 작성.
  5. GitHub Releasesoftprops/action-gh-release 또는 gh release create CLI 로 생성.
  6. 배포 게시 — 같은 workflow 에서 npm, PyPI, ghcr.io 등.

자동화 레벨

스펙트럼에서 자리 선택:

  • 수동 tag — 손으로 git tag. 가장 단순.
  • release-please (Google) — 'release' commit 자동 PR; PR merge 가 tag 생성.
  • changesets (npm 중심) — contributor 가 changeset 파일 작성; CI 가 집계하고 tag.
  • semantic-release — conventional commit 에서 완전 자동.

Code

Tag push 의 release workflow·yaml
name: release
on:
  push:
    tags: ['v*.*.*']
permissions:
  contents: write   # to create the GitHub Release
  id-token: write   # for trusted publishing to PyPI

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: astral-sh/setup-uv@v3
      - run: uv build
      - name: Generate changelog
        id: changelog
        run: |
          # Crude: list commits since the previous tag
          previous=$(git tag --sort=-creatordate | sed -n 2p)
          {
            echo 'log<<EOF'
            git log --pretty='- %s (%h)' "$previous"..HEAD
            echo 'EOF'
          } >> $GITHUB_OUTPUT
      - uses: softprops/action-gh-release@v2
        with:
          files: dist/*
          body: '${{ steps.changelog.outputs.log }}'
      - name: Publish to PyPI (trusted)
        uses: pypa/gh-action-pypi-publish@release/v1

External links

Exercise

Sandbox repo 에 release workflow 설정: 로컬에서 v0.1.0 tag, push, workflow 가 tag commit log 와 함께 GitHub Release 생성하는 거 봐. v0.1.1 로 bump 하고 changelog 가 새 commit 만으로 좁혀지는지 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.