Skip to content

Commit 27ac6e1

Browse files
committed
cd: fix preview releases workflow
1 parent f728181 commit 27ac6e1

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/cd.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
runs-on: windows-latest
2626
env:
2727
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages # NuGet CLI environment variables
28+
GH_TOKEN: ${{ github.token }}
2829
steps:
2930
- uses: actions/checkout@v4
3031
with:
@@ -35,19 +36,21 @@ jobs:
3536
with:
3637
dotnet-version: |
3738
7.0.x
38-
8.0.x
39+
9.0.x
3940
cache: true
4041
cache-dependency-path: '**/packages.lock.json'
41-
- run: |
42-
dotnet tool update -g dotnet-script
43-
dotnet tool update -g docfx
44-
dotnet restore --locked-mode
42+
- run: dotnet restore --locked-mode
43+
- run: dotnet tool update -g dotnet-script
44+
- run: dotnet tool update -g docfx
4545

4646
- id: build
47-
env:
48-
GH_TOKEN: ${{ github.token }}
47+
run: dotnet script ./tools/Builder/Build.csx
48+
49+
- name: Preview CHANGELOG
50+
if: steps.build.outputs.is_preview == 'True'
4951
run: |
50-
dotnet script ./tools/Builder/Build.csx
52+
$latest = gh release view --json tagName --jq .tagName
53+
python3 tools/ChangelogGenerator/changelog_generator.py --tag "${{ steps.build.outputs.tag }}" --latest "$latest"
5154
./docs/build.ps1
5255
5356
- uses: actions/upload-artifact@v4
@@ -101,12 +104,6 @@ jobs:
101104
7z x artifact.tar -o'${{ needs.build.outputs.version }}'
102105
7z a docs.zip '${{ needs.build.outputs.version }}'
103106
104-
- name: Preview CHANGELOG
105-
if: needs.build.outputs.is_preview == 'True'
106-
run: |
107-
latest="$(gh release view --json tagName --jq .tagName)"
108-
python3 tools/ChangelogGenerator/changelog_generator.py --tag "${{ needs.build.outputs.tag }}" --latest "${latest}"
109-
110107
- if: needs.build.outputs.is_release == 'True'
111108
uses: softprops/action-gh-release@v2
112109
with:

tools/Builder/Build.csx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ File.AppendAllText(GITHUB_STEP_SUMMARY, $"""
7474
<PackageReference Include="Maa.Framework" Version="{verStr}" />
7575
<PackageReference Include="Maa.Framework.Native" Version="{verStr}" />
7676
<PackageReference Include="Maa.Framework.Runtimes" Version="{runtimes}" />
77+
78+
<PackageReference Include="Maa.Framework.Binding" Version="{verStr}" />
79+
<PackageReference Include="Maa.Framework.Binding.Native" Version="{verStr}" />
80+
<PackageReference Include="Maa.Framework.Binding.Extensions" Version="{verStr}" />
7781
```
7882
7983
For more information, please read [add packages](https://github.com/MaaXYZ/MaaFramework.Binding.CSharp/#add-packages).

0 commit comments

Comments
 (0)