From 13da379728cb9f21ab97c5ca69b434e5fd987805 Mon Sep 17 00:00:00 2001 From: startgenshin <144767394+startgenshin@users.noreply.github.com> Date: Sun, 17 Dec 2023 15:59:35 +0800 Subject: [PATCH 1/2] trim trailing whitespace --- .github/workflows/build.yml | 10 +++++----- .github/workflows/publish.yml | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f9ace0..5839420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,22 +12,22 @@ jobs: steps: - uses: actions/checkout@v4.1.1 - + - name: Setup .NET uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: 8.x - + - name: Restore dependencies run: dotnet restore - + - name: Build run: dotnet build - + - name: Publish run: dotnet publish -c Release working-directory: ./SubRenamer - + - name: Upload Build Artifact uses: actions/upload-artifact@v4.0.0 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cb178fe..f68eb4a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: tags: - "v*.*.*" - + jobs: build: runs-on: windows-latest @@ -12,38 +12,38 @@ jobs: steps: - uses: actions/checkout@v4.1.1 - + - name: Setup .NET uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: 8.x - + - name: Restore dependencies run: dotnet restore - + - name: Build run: dotnet build - + - name: Publish run: dotnet publish -r win-x64 -p:PublishSingleFile=true -c Release --self-contained false working-directory: ./SubRenamer - + - name: Publish run: dotnet publish -r win-arm64 -p:PublishSingleFile=true -c Release --self-contained false working-directory: ./SubRenamer - + - name: Zip Build Artifact uses: vimtor/action-zip@v1 with: files: ./SubRenamer/bin/Release/net8.0-windows/win-x64/publish dest: SubRenamer-win-x64.zip - + - name: Zip Build Artifact uses: vimtor/action-zip@v1 with: files: ./SubRenamer/bin/Release/net8.0-windows/win-arm64/publish dest: SubRenamer-win-arm64.zip - + - name: Release uses: softprops/action-gh-release@v1 with: From c5f02117db6381bc10d23c84b9165c7a82309436 Mon Sep 17 00:00:00 2001 From: startgenshin <144767394+startgenshin@users.noreply.github.com> Date: Sun, 17 Dec 2023 16:00:35 +0800 Subject: [PATCH 2/2] update workflow file --- .github/workflows/publish.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f68eb4a..bb38c3e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,30 +25,26 @@ jobs: run: dotnet build - name: Publish - run: dotnet publish -r win-x64 -p:PublishSingleFile=true -c Release --self-contained false + run: | + dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishDir=.\artifacts\win-x64-with-runtime --self-contained true + dotnet publish -c Release -r win-arm64 -p:PublishSingleFile=true -p:PublishDir=.\artifacts\win-arm64-with-runtime --self-contained true + dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishDir=.\artifacts\win-x64 --self-contained false + dotnet publish -c Release -r win-arm64 -p:PublishSingleFile=true -p:PublishDir=.\artifacts\win-arm64 --self-contained false working-directory: ./SubRenamer - - name: Publish - run: dotnet publish -r win-arm64 -p:PublishSingleFile=true -c Release --self-contained false - working-directory: ./SubRenamer - - - name: Zip Build Artifact - uses: vimtor/action-zip@v1 - with: - files: ./SubRenamer/bin/Release/net8.0-windows/win-x64/publish - dest: SubRenamer-win-x64.zip - - - name: Zip Build Artifact - uses: vimtor/action-zip@v1 - with: - files: ./SubRenamer/bin/Release/net8.0-windows/win-arm64/publish - dest: SubRenamer-win-arm64.zip + - name: Compress Build Artifact + run: | + Compress-Archive -Path .\SubRenamer\artifacts\win-x64-with-runtime\* -DestinationPath .\SubRenamer-with-runtime-win-x64.zip + Compress-Archive -Path .\SubRenamer\artifacts\win-arm64-with-runtime\* -DestinationPath .\SubRenamer-with-runtime-win-arm64.zip + Compress-Archive -Path .\SubRenamer\artifacts\win-x64\* -DestinationPath .\SubRenamer-win-x64.zip + Compress-Archive -Path .\SubRenamer\artifacts\win-arm64\* -DestinationPath .\SubRenamer-win-arm64.zip + Get-FileHash -Path .\SubRenamer*.zip | Format-List > sha256sum.txt - name: Release uses: softprops/action-gh-release@v1 with: files: | - SubRenamer-win-x64.zip - SubRenamer-win-arm64.zip + SubRenamer*.zip + sha256sum.txt env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}