mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 15:13:32 +00:00
Extracted version extraction logic from workflows into a centralized script for better reusability and consistency. Updated validation output naming for clarity. Changes: - Add extract_version.sh for centralized version extraction - Remove update_version.sh (functionality integrated into workflows) - Update validate_semver.sh output: release_type → is_prerelease - Refactor docker-release.yml to use extract_version.sh - Refactor github-release.yml to use centralized scripts - Add version duplication check in version-release.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: GitHub Release
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Publish Release"]
|
|
types:
|
|
- completed
|
|
branches:
|
|
- 'release/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
create-github-release:
|
|
name: Create GitHub Release
|
|
runs-on: ubuntu-latest
|
|
# Only run if the upstream workflow succeeded
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
environment: prod
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_branch }}
|
|
fetch-depth: 0
|
|
|
|
- name: Extract version from branch
|
|
id: extract
|
|
run: .github/scripts/extract_version.sh "${{ github.event.workflow_run.head_branch }}"
|
|
|
|
- name: Validate version format
|
|
id: validate
|
|
run: .github/scripts/validate_semver.sh "${{ steps.extract.outputs.version }}"
|
|
|
|
- name: Extract release notes
|
|
id: release-notes
|
|
run: .github/scripts/extract_release_notes.sh "${{ steps.extract.outputs.version }}"
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: v${{ steps.extract.outputs.version }}
|
|
name: Release ${{ steps.extract.outputs.version }}
|
|
body_path: release_notes.md
|
|
prerelease: ${{ steps.validate.outputs.is_prerelease }}
|
|
draft: false
|