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

Build artifact

~11 min · artifacts, build, immutable

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

한 번 build, 그 정확한 거 ship

foundation track 의 'build once, deploy many' 원칙이 artifact pipeline 에서 펼쳐져. Artifact 가 실제 ship 하는 것. 다음을 만족해야:

  1. 재현 가능 — 새 머신에서 같은 source 가 bit 동등 artifact 생산.
  2. Versioning — 고유 이름 (Git SHA, semantic version, timestamp).
  3. Immutable — 게시 후 절대 덮어쓰지 않음.
  4. 검증 가능 — checksum, signature, 또는 둘 다.

Artifact 저장 destination

  • GitHub Releases — 사람 ship 가능한 binary (CLI 도구, 설치기).
  • GitHub Container Registry (ghcr.io) — Docker image.
  • npm / PyPI / crates.io — 언어 패키지.
  • S3 / R2 / GCS — 일반 blob.
  • 내부 artifact 저장소 — Artifactory, Nexus 등.

Versioning

흔한 두 가지 scheme:

  • SemVer + Git SHA — 사람 ship release 는 v1.4.2+abc1234. API 안정 약속에 SemVer; 추적성에 SHA.
  • Date + SHA — 사용자 face 시맨틱 없는 내부 build 는 2026-04-30-abc1234.

Code

Python wheel build + checksum + 업로드·yaml
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v3
      - run: uv build  # produces dist/*.whl + dist/*.tar.gz
      - name: Compute checksums
        working-directory: dist
        run: sha256sum *.whl *.tar.gz > SHA256SUMS
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-${{ github.sha }}
          path: dist/

External links

Exercise

Build 을 깨끗한 머신에서 두 번 (또는 깨끗한 runner 두 개에서). 출력 SHA256 계산. 동일해? 아니면 비결정적인 거 식별 (timestamp, build ID, 임베디드 경로) 후 pin 하거나 제거.

Progress

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

댓글 0

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

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