Skip to content

Commit 8b137a1

Browse files
authored
[Workflow] Release Notes => Change Log (#526)
The focus of these changes is to update the release process to explicitly point the "Release Notes" on the GH release page to the change log for the release. This will ensure that default content is not generated, and we have one consistent source of truth for the changes in a release.
1 parent b95f6a5 commit 8b137a1

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow is triggered by new releases and on a daily schedule.
2-
# It builds, unit tests, live tests and published the Open AI nuget package.
2+
# It builds, unit tests, live tests and publishes the Open AI NuGet package.
33
# For daily runs, the package is published to the GitHub package registry.
44
# For releases, the package is published to the NuGet package registry.
55
name: Release package
@@ -11,16 +11,17 @@ on:
1111
# run every day at 00:00
1212
- cron: '0 0 * * *'
1313

14+
permissions:
15+
contents: write
16+
packages: write
17+
1418
jobs:
1519
build:
1620
name: Build
1721
runs-on: ubuntu-latest
1822
environment: Live Testing
1923
env:
2024
version_suffix_args: ${{ github.event_name == 'schedule' && format('/p:VersionSuffix="alpha.{0}"', github.run_number) || '' }}
21-
permissions:
22-
packages: write
23-
contents: write
2425
steps:
2526
- name: Setup .NET
2627
uses: actions/setup-dotnet@v3
@@ -35,7 +36,7 @@ jobs:
3536
- name: Checkout code
3637
uses: actions/checkout@v2
3738

38-
# Pack the client nuget package and include url back to the repository and release tag
39+
# Pack the client NuGet package and include URL back to the repository and release tag
3940
- name: Build and Pack
4041
run: dotnet pack
4142
--configuration Release
@@ -86,6 +87,12 @@ jobs:
8687
env:
8788
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8889

90+
- name: Update GitHub release notes to point to the changelog
91+
if: github.event_name == 'release'
92+
run: |
93+
gh release edit "${{ github.event.release.tag_name }}" \
94+
--notes "See full changelog: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.release.tag_name }}/CHANGELOG.md"
95+
8996
- name: NuGet authenticate
9097
run: dotnet nuget add source
9198
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
@@ -96,15 +103,15 @@ jobs:
96103

97104
- name: Publish package to local feed
98105
run: dotnet nuget push
99-
${{github.workspace}}/build-artifacts/packages/*.nupkg
106+
${{ github.workspace }}/build-artifacts/packages/*.nupkg
100107
--source "github"
101108
--api-key ${{ secrets.GITHUB_TOKEN }}
102109
--skip-duplicate
103110

104111
- name: Publish package to nuget.org
105112
if: github.event_name == 'release'
106113
run: dotnet nuget push
107-
${{github.workspace}}/build-artifacts/packages/*.nupkg
114+
${{ github.workspace }}/build-artifacts/packages/*.nupkg
108115
--source https://api.nuget.org/v3/index.json
109116
--api-key ${{ secrets.NUGET_API_KEY }}
110117
--skip-duplicate

0 commit comments

Comments
 (0)