Skip to content

Commit 09b2049

Browse files
Merge release/1.0 into main (#217)
- **Release: v1.0 = core rewrite, CI/CD, docs, and test suite overhaul (#166)** - **fixes for 1.0 (#171)** - **FIX: workflows (#173)** - **version-snapshot guides alongside API reference, fix index.md links, add released versions table (#176)** - **minor updates to code and docs generation (#180)** - **Fix version switcher URL bug and improve docs navigation/landing page (#183)** - **backtracking (#189)** - **backtracking (#195)** - **backtracking 2 (#198)** - **Preview/1.0 (#202)** - **Promote preview/1.0 to release/1.0 (#208)** - **Promote preview/1.0 to release/1.0 (#211)** - **Promote preview/1.0 to release/1.0 (#215)**
1 parent 6456dbc commit 09b2049

8 files changed

Lines changed: 38 additions & 22 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'Configure git identity'
2+
author: 'Pete Sramek'
3+
description: 'Configures git user name and email from the last commit.'
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: 'Configure git identity'
9+
shell: bash
10+
run: |
11+
git config user.name "$(git log -n 1 --pretty=format:%an)"
12+
git config user.email "$(git log -n 1 --pretty=format:%ae)"

.github/actions/git/push-changes/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ runs:
8787
set -e
8888
working-directory: ${{ inputs.working-directory }}
8989

90+
- name: Configure git identity
91+
if: ${{ fromJSON(steps.validate.outputs.has-changes) == '1' }}
92+
uses: './.github/actions/git/configure-identity'
93+
9094
- name: Push changes to ${{ github.head_ref || github.ref }}
9195
if: ${{ fromJSON(steps.validate.outputs.has-changes) == '1' }}
9296
shell: bash
9397
run: |
94-
git config user.name "$(git log -n 1 --pretty=format:%an)"
95-
git config user.email "$(git log -n 1 --pretty=format:%ae)"
9698
git commit -m '${{ inputs.commit-message }}'
9799
git pull --rebase origin ${{ github.head_ref || github.ref }}
98100
git push

.github/actions/github/create-release/action.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ runs:
2323
echo "is-preview=${{ inputs.is-preview }}"
2424
echo "preview-argument=${{ inputs.is-preview == 'true' && '--prerelease' || '' }}"
2525
echo "notes-start-tag=${{ inputs.notes-start-tag }}"
26-
echo "notes-start-tag-argument="${{ inputs.notes-start-tag != '' && '--notes-start-tag $(inputs.notes-start-tag)' || '' }}"
26+
echo "notes-start-tag-argument=${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}"
2727
shell: bash
28-
- name: 'Create git tag ${{ env.release-version }}'
28+
- name: 'Configure git identity'
29+
uses: './.github/actions/git/configure-identity'
30+
- name: 'Create git tag ${{ inputs.release-version }}'
2931
shell: bash
3032
run: |
31-
git tag -a ${{ env.release-version }} -m "${{ env.release-version }}"
32-
- name: 'Create GitHub release PolylineAlgorithm ${{ env.release-version }}'
33+
git tag -a ${{ inputs.release-version }} -m "${{ inputs.release-version }}"
34+
git push origin ${{ inputs.release-version }}
35+
- name: 'Create GitHub release PolylineAlgorithm ${{ inputs.release-version }}'
3336
shell: bash
3437
env:
3538
GH_TOKEN: ${{ github.token }}
3639
release-version: ${{ inputs.release-version }}
3740
preview-argument: "${{ inputs.is-preview == 'true' && '--prerelease' || '' }}"
38-
notes-start-tag-argument: "${{ inputs.notes-start-tag != '' && '--notes-start-tag $(inputs.notes-start-tag)' || '' }}"
41+
notes-start-tag-argument: "${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}"
3942
run: |
4043
gh release create ${{ env.release-version }} --generate-notes --discussion-category "General" ${{ env.preview-argument }} ${{ env.notes-start-tag-argument }}

.github/workflows/backtrack.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ jobs:
3030
token: ${{ secrets.GH_ADMIN_TOKEN }}
3131

3232
- name: 'Configure git'
33-
run: |
34-
git config user.name "$(git log -n 1 --pretty=format:%an)"
35-
git config user.email "$(git log -n 1 --pretty=format:%ae)"
33+
uses: './.github/actions/git/configure-identity'
3634

3735
- name: 'Resolve backtrack targets'
3836
id: targets

.github/workflows/bump-version.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ jobs:
113113
dotnet-version: ${{ env.dotnet-sdk-version }}
114114

115115
- name: 'Configure git'
116-
run: |
117-
git config user.name "$(git log -n 1 --pretty=format:%an)"
118-
git config user.email "$(git log -n 1 --pretty=format:%ae)"
116+
uses: './.github/actions/git/configure-identity'
119117

120118
- name: 'Create develop branch from main'
121119
run: |

.github/workflows/promote-branch.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
target-branch-exists: ${{ steps.check-target-branch-exists.outputs.target-branch-exists }}
6161
pull-request-exists: ${{ steps.check-pull-request-exists.outputs.pull-request-exists }}
6262
steps:
63+
- name: 'Checkout ${{ github.head_ref || github.ref }}'
64+
uses: actions/checkout@v6
6365
- name: 'Set target branch'
6466
id: set-target-branch
6567
run: |
@@ -211,17 +213,12 @@ jobs:
211213
run: |
212214
git fetch origin
213215
git push origin origin/${{ env.base-branch }}:refs/heads/${{ env.target-branch }}
214-
- name: 'Lock target branch'
215-
if: ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }}
216-
uses: './.github/actions/github/branch-protection/lock'
217-
with:
218-
branch: ${{ needs.workflow-variables.outputs.target-branch }}
219-
token: ${{ secrets.GH_ADMIN_TOKEN }}
220216
- name: 'Create PR: "Promote ${{ env.current-branch }} to ${{ env.target-branch }}"'
221217
if: ${{ needs.workflow-variables.outputs.pull-request-exists == 'false' }}
222218
env:
223219
GH_TOKEN: ${{ github.token }}
224220
current-branch: ${{ github.ref_name }}
225221
target-branch: ${{ needs.workflow-variables.outputs.target-branch }}
226222
run: |
223+
git fetch origin ${{ env.target-branch }}
227224
gh pr create --title "Promote ${{ env.current-branch }} to ${{ env.target-branch }}" --fill --base ${{ env.target-branch }} --head ${{ env.current-branch }}

.github/workflows/pull-request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ on:
88
- synchronize
99
- reopened
1010
branches:
11+
- 'develop/**'
1112
- 'preview/**'
12-
- 'release/**'
13+
- 'release/**'
1314

1415
permissions:
1516
actions: read

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ jobs:
277277
needs: [workflow-variables, release, versioning]
278278
if: ${{ needs.workflow-variables.outputs.is-release == 'true' }}
279279
runs-on: ubuntu-latest
280+
permissions:
281+
pull-requests: write
282+
contents: read
280283
env:
281284
GH_TOKEN: ${{ github.token }}
282285
current-branch: ${{ github.ref_name }}
@@ -358,11 +361,13 @@ jobs:
358361
echo "support-branch-exists=false" >> $GITHUB_OUTPUT
359362
fi
360363
364+
- name: 'Configure git identity'
365+
if: ${{ steps.check-support-branch.outputs.support-branch-exists == 'false' }}
366+
uses: './.github/actions/git/configure-identity'
367+
361368
- name: 'Create support branch'
362369
if: ${{ steps.check-support-branch.outputs.support-branch-exists == 'false' }}
363370
run: |
364-
git config user.name "$(git log -n 1 --pretty=format:%an)"
365-
git config user.email "$(git log -n 1 --pretty=format:%ae)"
366371
git checkout -b "${{ steps.resolve-support-branch.outputs.support-branch }}"
367372
git push --set-upstream origin "${{ steps.resolve-support-branch.outputs.support-branch }}"
368373

0 commit comments

Comments
 (0)