Skip to content

Commit 41e4701

Browse files
authored
fixes for 1.0 (#171)
1 parent 69df3e8 commit 41e4701

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

.github/workflows/publish-documentation.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- 'release/**'
8-
paths:
9-
- 'src/**'
10-
- 'api-reference/**'
5+
workflow_call:
116

127
permissions:
138
actions: read
@@ -100,8 +95,8 @@ jobs:
10095
id: discover-versions
10196
shell: bash
10297
run: |
103-
versions=$(ls api-reference/ | grep -E '^\d+\.\d+$' | sort -V | paste -sd ',' -)
104-
latest=$(ls api-reference/ | grep -E '^\d+\.\d+$' | sort -V | tail -1)
98+
versions=$(ls api-reference/ | grep -E '^[0-9]+\.[0-9]+$' | sort -V | paste -sd ',' -)
99+
latest=$(ls api-reference/ | grep -E '^[0-9]+\.[0-9]+$' | sort -V | tail -1)
105100
echo "versions=$versions" >> $GITHUB_OUTPUT
106101
echo "latest=$latest" >> $GITHUB_OUTPUT
107102

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,20 @@ jobs:
206206
${{ runner.temp }}/${{ env.nuget-packages-directory }}/**/*.nupkg
207207
${{ runner.temp }}/${{ env.nuget-packages-directory }}/**/*.snupkg
208208
209+
publish-documentation:
210+
name: 'Publish documentation'
211+
needs: [pack, validate-release, workflow-variables]
212+
if: ${{ needs.workflow-variables.outputs.is-release == 'true' }}
213+
uses: ./.github/workflows/publish-documentation.yml
214+
permissions:
215+
actions: read
216+
pages: write
217+
id-token: write
218+
209219
publish-package:
210220
name: 'Publish package'
211-
needs: [pack, validate-release]
221+
needs: [pack, validate-release, publish-documentation]
222+
if: ${{ always() && needs.pack.result == 'success' && needs.validate-release.result == 'success' && (needs.publish-documentation.result == 'success' || needs.publish-documentation.result == 'skipped') }}
212223
env:
213224
package-artifact-name: ${{ needs.pack.outputs.package-artifact-name }}
214225
runs-on: ubuntu-latest
@@ -243,12 +254,14 @@ jobs:
243254
steps:
244255
- name: 'Checkout ${{ github.head_ref || github.ref }}'
245256
uses: actions/checkout@v6
257+
with:
258+
fetch-tags: true
246259

247260
- name: 'Determine notes start tag'
248261
id: determine-notes-start-tag
249262
run: |
250-
notes-start-tag=$(git describe --abbrev=0 --tags)
251-
echo "notes-start-tag=$notes-start-tag" >> $GITHUB_OUTPUT
263+
notes_start_tag=$(git describe --abbrev=0 --tags 2>/dev/null || echo "")
264+
echo "notes-start-tag=$notes_start_tag" >> $GITHUB_OUTPUT
252265
shell: bash
253266

254267
- name: 'Create GitHub Release'

0 commit comments

Comments
 (0)