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
23 changes: 0 additions & 23 deletions .github/workflows/Create Issue Branch.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/Create Release.yml

This file was deleted.

71 changes: 40 additions & 31 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
name: Format

on:
on:
push:
workflow_run:
workflows:
- Create Prerelease
- Create Release
types: [requested]
workflow_dispatch:
pull_request:
types: [opened,edited,synchronize,reopened]
branches:
- main
- develop
types: [opened, edited, synchronize, reopened]
branches: [main, develop]

workflow_run:
workflows: [Create Prerelease, Create Release]
types: [requested]

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

env:
DOTNET_VERSION: '9.0.x'

jobs:
format:
discover:
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.set_branch.outputs.branch_name }}

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Format
run: dotnet format
- id: set_branch
shell: bash
run: |
# 1. Pick the raw branch/ref for each trigger type
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
RAW='${{ github.event.workflow_run.head_branch }}'
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
RAW='${{ github.event.pull_request.base.ref }}'
else
RAW='${{ github.ref }}'
fi

- name: Update Styles
continue-on-error: true
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git commit -am "Updated code formatting to match rules in .editorconfig"
git push
# 2. Strip the refs/heads/ prefix if present
CLEAN="${RAW#refs/heads/}"

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

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

83 changes: 0 additions & 83 deletions .github/workflows/Publish.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/Test Report.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/Test.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/Unlist Nuget.yml

This file was deleted.

Loading
Loading