mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 15:13:32 +00:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: GitHub Release
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Docker Release"]
|
|
types:
|
|
- completed
|
|
branches:
|
|
- 'release/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
CURRENT_BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
|
|
|
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: $CURRENT_BRANCH_NAME
|
|
fetch-depth: 0
|
|
|
|
- name: Extract version from branch
|
|
id: extract
|
|
run: .github/scripts/extract_version.sh "$CURRENT_BRANCH_NAME"
|
|
|
|
- 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
|