Cum să creezi release-uri GitHub cu Drone CI
DodaTech
Updated 2025-01-15
1 min read
In this tutorial, you'll learn about Cum să creezi release. We cover key concepts, practical examples, and best practices.
Crearea automată a release-urilor GitHub din Drone CI simplifică procesul de publicare a versiunilor.
Configurare pipeline
kind: pipeline
name: release
steps:
- name: build
image: golang:1.20
commands:
- go build -o app
- tar -czf app.tar.gz app
- name: release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: app.tar.gz
title: Release ${DRONE_TAG}
note: CHANGELOG.md
Declanșare la tag
trigger:
event:
- tag
Release cu note detaliate
steps:
- name: release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*.tar.gz
- dist/*.sha256
title: Release ${DRONE_TAG}
note: |
## Changes
- Feature A
- Bug fix B
draft: false
prerelease: false
Release cu artefacte multiple
steps:
- name: build-all
image: golang:1.20
commands:
- GOOS=linux go build -o app-linux
- GOOS=darwin go build -o app-darwin
- GOOS=windows go build -o app.exe
- name: upload
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- app-linux
- app-darwin
- app.exe
Prevenire
- Protejează token-ul GitHub ca secret
- Verifică permisiunile token-ului
- Testează release-ul ca draft înainte
DodaTech Tools
Doda Browser notifică despre release-uri noi. Durga Antivirus Pro scanează artefactele înainte de publicare.
Întrebări frecvente
Construit de echipa Doda Browser, DodaZIP și Durga Antivirus Pro.
← Previous
Cum să integrezi Drone CI cu GitHub Checks API
Next →
Cum să rulezi Drone CI runner pe Kubernetes
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro