Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 0 additions & 99 deletions .github/workflows/create-release.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/create-test-report.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Create Release

on:
workflow_dispatch:
inputs:
mode:
description: |
How to set the version:
- explicit: set to a specific value (e.g., 1.3-alpha)
- bump: bump major/minor/patch from current SimpleVersion and apply optional prerelease
- auto: policy-based (develop->next minor -alpha; hotfix/*->next patch -alpha; main/vX.Y->stable)
type: choice
options: [auto, bump, explicit]
default: auto
version:
description: "When mode=explicit: exact version (e.g., 1.3-alpha, 1.2.3, 1.4.0-rc)"
type: string
default: ""
increment:
description: "When mode=bump: major | minor | patch"
type: choice
options: [major, minor, patch]
default: patch
prerelease:
description: "When mode=bump: prerelease suffix WITHOUT leading dash (e.g., alpha, beta, rc). Leave blank for stable."
type: string
default: ""

permissions:
contents: write
pull-requests: write
packages: write

run-name: "Create Release · ${{ inputs.mode }} · ${{ github.ref_name }}"

jobs:
validate-inputs:
runs-on: ubuntu-latest
steps:
- name: Check conditional requirements
run: |
set -euo pipefail
MODE='${{ inputs.mode }}'
VERSION='${{ inputs.version }}'
INCR='${{ inputs.increment }}'
if [[ "$MODE" == "explicit" && -z "$VERSION" ]]; then
echo "❌ mode=explicit requires 'version' (e.g., 1.3-alpha)."; exit 1
fi
if [[ "$MODE" == "bump" && -z "$INCR" ]]; then
echo "❌ mode=bump requires 'increment' (major|minor|patch)."; exit 1
fi
echo "✅ inputs look good."

set-version:
needs: validate-inputs
uses: Stillpoint-Software/shared-workflows/.github/workflows/set_version.yml@main
with:
target_branch: ${{ github.ref_name }}
mode: ${{ inputs.mode }}
version: ${{ inputs.version }}
increment: ${{ inputs.increment }}
prerelease: ${{ inputs.prerelease }}
secrets: inherit

create-release:
needs: set-version
uses: Stillpoint-Software/shared-workflows/.github/workflows/prepare_release.yml@main
with:
target_branch: ${{ github.ref_name }}
tag: ${{ needs.set-version.outputs.tag }}
prerelease: ${{ needs.set-version.outputs.new_prerelease }}
draft: true
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/create_test_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Test Report

on:
workflow_run:
workflows: ["Run Tests"]
types: [completed]
branches: [main, develop]

permissions:
contents: read
actions: read
checks: write

jobs:
discover-auto:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_run' }}
outputs:
branch_name: ${{ steps.meta.outputs.branch }}
sha: ${{ steps.meta.outputs.sha }}
run_id: ${{ steps.meta.outputs.run_id }}
conclusion: ${{ steps.meta.outputs.conclusion }}
steps:
- id: meta
run: |
echo "branch=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_OUTPUT"
echo "sha=${{ github.event.workflow_run.head_sha }}" >> "$GITHUB_OUTPUT"
echo "run_id=${{ github.event.workflow_run.id }}" >> "$GITHUB_OUTPUT"
echo "conclusion=${{ github.event.workflow_run.conclusion }}" >> "$GITHUB_OUTPUT"

report-auto:
needs: discover-auto
if: ${{ needs.discover-auto.outputs.conclusion != 'skipped' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/test_report.yml@main
with:
test_run_id: ${{ needs.discover-auto.outputs.run_id }}
branch: ${{ needs.discover-auto.outputs.branch_name }}
sha: ${{ needs.discover-auto.outputs.sha }}
secrets: inherit
34 changes: 9 additions & 25 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
workflow_run:
workflows: [Create Prerelease, Create Release]
types: [requested]
branches: [main, develop]


permissions:
contents: read
contents: write
pull-requests: write
actions: read

jobs:
Expand All @@ -40,29 +40,13 @@ jobs:

echo "Detected branch: $CLEAN"
echo "branch_name=$CLEAN" >> "$GITHUB_OUTPUT"

show-branch:
needs: discover
runs-on: ubuntu-latest
steps:
- name: Print branch_name from discover
run: |
echo "::notice title=branch_name::'${{ needs.discover.outputs.branch_name }}'"

format-main:

format:
needs: discover
if: ${{ needs.discover.outputs.branch_name == 'main' }}
if: ${{ needs.discover.result == 'success' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/format.yml@main
with:
dotnet_version: "9.0.x"
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

format-develop:
needs: discover
if: ${{ needs.discover.outputs.branch_name == 'develop' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/format.yml@develop
with:
dotnet_version: "9.0.x"
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
branch: ${{ needs.discover.outputs.branch_name }}
secrets: inherit

45 changes: 0 additions & 45 deletions .github/workflows/issue-branch.yml

This file was deleted.

Loading
Loading