Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai committed Dec 26, 2023
1 parent 1700d4c commit df30952
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Clean HTMLToDocX
run: dotnet clean HTMLToDocX/HTMLToDocX.csproj --configuration Release && dotnet nuget locals all --clear
- name: Restore dependencies for HTMLToDocX
run: dotnet restore HTMLToDocX/HTMLToDocX.csproj
- name: Build HTMLToDocX
run: dotnet build HTMLToDocX/HTMLToDocX.csproj --no-restore --configuration Release
- name: Set Version
run: powershell -Command "(gc $env:GITHUB_WORKSPACE\HTMLToDocX\Utils\ActionVersion.cs) -replace '{VERSION}', '$env:GITHUB_REF_NAME' | Out-File $env:GITHUB_WORKSPACE\HTMLToDocX\Utils\ActionVersion.cs"
- name: Set Build
run: powershell -Command "(gc $env:GITHUB_WORKSPACE\HTMLToDocX\Utils\ActionVersion.cs) -replace '{BUILD}', '$env:GITHUB_RUN_NUMBER' | Out-File $env:GITHUB_WORKSPACE\HTMLToDocX\Utils\ActionVersion.cs"
- name: Publish HTMLToDocX
run: dotnet publish HTMLToDocX/HTMLToDocX.csproj -c Release -r win-x64 --no-restore
- name: Clean
run: dotnet clean $env:GITHUB_WORKSPACE\EvernoteToNotionChrome.sln --configuration Release && dotnet nuget locals all --clear
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish -c Release -r win-x64
- run: powershell curl https://github.com/aiqinxuancai/DotNetDllPathPatcherWPF/releases/download/v0.0.15/DotNetDllPathPatcherCMD.zip -o DotNetDllPathPatcherCMD.zip
- run: powershell Expand-Archive -Path .\DotNetDllPathPatcherCMD.zip -DestinationPath .\DotNetDllPathPatcherCMD
- run: powershell .\DotNetDllPathPatcherCMD\publish\DotNetDllPathPatcherCMD.exe $env:GITHUB_WORKSPACE\HTMLToDocX\bin\Release\net8.0-windows\win-x64\publish\HTMLToDocX.exe
Expand All @@ -37,4 +35,4 @@ jobs:
uses: ncipollo/release-action@v1
with:
artifacts: "HTMLToDocX.zip"
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit df30952

Please sign in to comment.