Skip to content

Commit a43c0d6

Browse files
committed
Merge branch 'develop/1.0' of https://github.com/sramekpete/polyline-algorithm-csharp into develop/1.0
2 parents 6e6fc35 + 5c49a47 commit a43c0d6

23 files changed

+2560
-120
lines changed

.github/actions/determine-version/action.yml

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

.github/workflows/build.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- 'release/**'
99
push:
1010
branches:
11-
- '**'
11+
- 'develop/**'
12+
- 'support/**'
1213
paths:
1314
- 'src/**'
1415

@@ -51,26 +52,12 @@ jobs:
5152
echo "is-preview:${{ startsWith(github.ref_name, 'preview') }}"
5253
5354
versioning:
54-
name: 'Determine version'
55+
name: 'Determine assembly version'
5556
needs: [workflow-variables]
56-
runs-on: ubuntu-latest
57-
58-
outputs:
59-
friendly-version: ${{ env.friendly-version }}
60-
assembly-version: ${{ env.assembly-version }}
61-
assembly-informational-version: ${{ env.assembly-informational-version }}
62-
file-version: ${{ env.file-version }}
63-
package-version: ${{ env.package-version }}
64-
65-
steps:
66-
- name: 'Checkout ${{ github.head_ref || github.ref }}'
67-
uses: actions/checkout@v4
68-
- name: 'Determine versions'
69-
uses: ./.github/actions/determine-version
70-
id: determine-version
71-
with:
72-
config-file-path: './.gitversion/version.yml'
73-
run-number: ${{ needs.workflow-variables.outputs.github-run-number }}
57+
uses: ./.github/workflows/determine-version.yml
58+
with:
59+
config-file-path: './.gitversion/version.yml'
60+
run-number: ${{ needs.global-variables.outputs.github-run-number }}
7461

7562
build:
7663
name: 'Compile source code'
@@ -253,4 +240,4 @@ jobs:
253240
with:
254241
artifact-name: 'assembly-metadata'
255242
commit-message: 'Updated docs for version ${{ env.friendly-version }}'
256-
working-directory: './api-reference/${{ env.friendly-version }}'
243+
working-directory: './api-reference/${{ env.friendly-version }}'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Create release'
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- 'preview/**'
7+
- 'release/**'
8+
paths:
9+
- 'src/**'
10+
11+
permissions:
12+
actions: read
13+
pages: write
14+
id-token: write
15+
contents: write
16+
17+
concurrency:
18+
group: create-release-${{ github.head_ref || github.ref }}
19+
cancel-in-progress: false
20+
21+
env:
22+
dotnet-sdk-version: '9.x'
23+
build-configuration: 'Release'
24+
build-platform: 'Any CPU'
25+
git-version: '6.0.x'
26+
test-result-directory: 'test-results'
27+
nuget-packages-directory: 'nuget-packages'
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: 'Determine version'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
# Required
7+
config-file-path:
8+
description: 'Path to the configuration file.'
9+
type: string
10+
required: true
11+
run-number:
12+
description: 'The run number of the parent workflow.'
13+
type: string
14+
required: true
15+
# Optional
16+
dotnet-sdk-version:
17+
description: 'Version of the .NET SDK to use. Default: ''9.0.x''.'
18+
type: string
19+
required: false
20+
default: '9.0.x'
21+
gitversion-version:
22+
description: 'Version of GitVersion to use. Default: ''6.1.x''.'
23+
required: false
24+
type: string
25+
default: '6.1.x'
26+
prerelease-tag:
27+
description: 'The prerelease tag to use. Default: ''''.'
28+
type: string
29+
required: false
30+
default: ''
31+
outputs:
32+
friendly-version:
33+
description: "The friedly version."
34+
value: ${{ jobs.version.outputs.friendly-version }}
35+
assembly-version:
36+
description: "The assembly version."
37+
value: ${{ jobs.version.outputs.assembly-version }}
38+
assembly-informational-version:
39+
description: "The assembly informational version."
40+
value: ${{ jobs.version.outputs.assembly-informational-version }}
41+
file-version:
42+
description: "The file version."
43+
value: ${{ jobs.version.outputs.file-version }}
44+
package-version:
45+
description: "The package version."
46+
value: ${{ jobs.version.outputs.package-version }}
47+
48+
jobs:
49+
version:
50+
name: 'Version'
51+
runs-on: ubuntu-latest
52+
53+
outputs:
54+
friendly-version: ${{ env.friendly-version }}
55+
assembly-version: ${{ env.assembly-version }}
56+
assembly-informational-version: ${{ env.assembly-informational-version }}
57+
file-version: ${{ env.file-version }}
58+
package-version: ${{ env.package-version }}
59+
60+
steps:
61+
62+
- name: 'Checkout ${{ github.head_ref || github.ref }}'
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: 'Setup GitVersion ${{ env.git-version }}'
68+
uses: gittools/actions/gitversion/setup@v4.1.0
69+
with:
70+
versionSpec: ${{ inputs.gitversion-version }}
71+
preferLatestVersion: true
72+
73+
- name: 'Determine version'
74+
id: gitversion
75+
uses: gittools/actions/gitversion/execute@v4.1.0
76+
with:
77+
configFilePath: ${{ inputs.config-file-path }}
78+
79+
- name: 'Set friendly version'
80+
shell: bash
81+
run: echo "friendly-version=${{ steps.gitversion.outputs.assemblySemVer }}" >> $GITHUB_ENV
82+
83+
- name: 'Set assembly version'
84+
shell: bash
85+
run: echo "assembly-version=${{ steps.gitversion.outputs.assemblySemVer }}.${{ inputs.run-number }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" >> $GITHUB_ENV
86+
87+
- name: 'Set assembly informational version'
88+
shell: bash
89+
run: echo "assembly-informational-version=${{ steps.gitversion.outputs.assemblySemVer }}.${{ inputs.run-number }}+${{ steps.gitversion.outputs.sha }}" >> $GITHUB_ENV
90+
91+
- name: 'Set file version'
92+
shell: bash
93+
run: echo "file-version=${{ steps.gitversion.outputs.AssemblySemFileVer }}.${{ inputs.run-number }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" >> $GITHUB_ENV
94+
95+
- if: ${{ steps.gitversion.outputs.PreReleaseLabelWithDash == '' }}
96+
name: 'Set package version'
97+
shell: bash
98+
run: echo "package-version=${{ steps.gitversion.outputs.AssemblySemVer }}.${{ inputs.run-number }}" >> $GITHUB_ENV
99+
100+
- if: ${{ steps.gitversion.outputs.PreReleaseLabelWithDash != '' }}
101+
name: 'Set package version'
102+
shell: bash
103+
run: echo "package-version=${{ steps.gitversion.outputs.AssemblySemVer }}.${{ inputs.run-number }}-${{ steps.gitversion.outputs.PreReleaseLabel }}-${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" >> $GITHUB_ENV

0 commit comments

Comments
 (0)