mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-10 06:14:36 +00:00
add SemVer release process with automated publishing
- Split workflows: CI (lint/validate) and Docker (dev builds) - Add release.yml for versioned releases with manual trigger - Release workflow creates release/<version> branches, updates version.py, builds Docker images with SemVer tags, and creates GitHub releases - Docker images tagged as major.minor.patch, major.minor, major, latest for stable releases - Pre-release versions tagged with exact version only 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
62
.github/workflows/docker.yml
vendored
Normal file
62
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Docker Dev Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Docker Dev Build & Push
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up variables
|
||||
id: vars
|
||||
run: |
|
||||
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"
|
||||
echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: rangermix/twitch-drops-miner
|
||||
tags: |
|
||||
type=raw,value=dev
|
||||
type=raw,value=dev-${{steps.vars.outputs.sha_short}}
|
||||
type=raw,value=latest,enable=${{github.ref == 'refs/heads/master'}}
|
||||
type=sha,prefix=
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{steps.meta.outputs.tags}}
|
||||
labels: ${{steps.meta.outputs.labels}}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
BUILD_DATE=${{steps.vars.outputs.date}}
|
||||
VCS_REF=${{github.sha}}
|
||||
VERSION=dev-${{steps.vars.outputs.sha_short}}
|
||||
Reference in New Issue
Block a user