-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Publishing application as self-contained executable (#101)
* trim trailing whitespace * update workflow file
- Loading branch information
1 parent
6437866
commit 6182d15
Showing
2 changed files
with
26 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,22 @@ jobs: | |
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
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/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,51 +4,47 @@ on: | |
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
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 | ||
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: 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 }} |