Skip to content

Commit 2eb29c0

Browse files
Merge pull request #39 from Stillpoint-Software/develop
Develop
2 parents 5d3e12f + d91dde6 commit 2eb29c0

21 files changed

+357
-671
lines changed

.github/workflows/Create Issue Branch.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/Create Release.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/Format.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,52 @@
11
name: Format
22

3-
on:
3+
on:
44
push:
5-
workflow_run:
6-
workflows:
7-
- Create Prerelease
8-
- Create Release
9-
types: [requested]
105
workflow_dispatch:
116
pull_request:
12-
types: [opened,edited,synchronize,reopened]
13-
branches:
14-
- main
15-
- develop
7+
types: [opened, edited, synchronize, reopened]
8+
branches: [main, develop]
9+
10+
workflow_run:
11+
workflows: [Create Prerelease, Create Release]
12+
types: [requested]
13+
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
actions: read
1618

17-
env:
18-
DOTNET_VERSION: '9.0.x'
19-
2019
jobs:
21-
format:
20+
discover:
2221
runs-on: ubuntu-latest
22+
outputs:
23+
branch_name: ${{ steps.set_branch.outputs.branch_name }}
2324

2425
steps:
25-
- name: Checkout Code
26-
uses: actions/checkout@v4
27-
28-
- name: Setup .NET
29-
uses: actions/setup-dotnet@v4
30-
with:
31-
dotnet-version: ${{ env.DOTNET_VERSION }}
32-
33-
- name: Format
34-
run: dotnet format
26+
- id: set_branch
27+
shell: bash
28+
run: |
29+
# 1. Pick the raw branch/ref for each trigger type
30+
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
31+
RAW='${{ github.event.workflow_run.head_branch }}'
32+
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
33+
RAW='${{ github.event.pull_request.base.ref }}'
34+
else
35+
RAW='${{ github.ref }}'
36+
fi
3537
36-
- name: Update Styles
37-
continue-on-error: true
38-
run: |
39-
git config --global user.name 'github-actions'
40-
git config --global user.email '[email protected]'
41-
git commit -am "Updated code formatting to match rules in .editorconfig"
42-
git push
38+
# 2. Strip the refs/heads/ prefix if present
39+
CLEAN="${RAW#refs/heads/}"
4340
41+
echo "Detected branch: $CLEAN"
42+
echo "branch_name=$CLEAN" >> "$GITHUB_OUTPUT"
43+
44+
format:
45+
needs: discover
46+
if: ${{ needs.discover.result == 'success' }}
47+
uses: Stillpoint-Software/shared-workflows/.github/workflows/format.yml@main
48+
with:
49+
dotnet_version: "9.0.x"
50+
branch: ${{ needs.discover.outputs.branch_name }}
51+
secrets: inherit
52+

.github/workflows/Publish.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.github/workflows/Test Report.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/Test.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/Unlist Nuget.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)