Skip to content

Commit deccbab

Browse files
committed
ci: enhance build-executables.yml to include executable compression and artifact upload steps
1 parent 91f7a4b commit deccbab

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

.github/workflows/build-executables.yml

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,41 +32,44 @@ jobs:
3232

3333
# Step 4: Build Executables
3434
- name: Build
35-
run: dotnet publish -c Release -r win-x64 --self-contained true
36-
# /p:PublishSingleFile=true
35+
run: dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true
3736

3837
# Step 5: Compress to zip
3938
- name: Compress to zip
4039
run: |
41-
cd \a\x4_XMLDiffAndPatch\x4_XMLDiffAndPatch\XMLPatch\bin\Release\net8.0\win-x64\
42-
Get-ChildItem -Path . -Recurse | Select-Object FullName, Length, LastWriteTime
43-
cd \a\x4_XMLDiffAndPatch\x4_XMLDiffAndPatch\XMLDiff\bin\Release\net8.0\win-x64\
44-
Get-ChildItem -Path . -Recurse | Select-Object FullName, Length, LastWriteTime
45-
cd \a\x4_XMLDiffAndPatch\x4_XMLDiffAndPatch\
46-
# mkdir -p XMLDiffAndPatch
47-
# cp -r XMLPatch\bin\Release\net8.0\win-x64\publish\XMLPatch.exe XMLDiffAndPatch
48-
# cp -r XMLDiff\bin\Release\net8.0\win-x64\publish\XMLDiff.exe XMLDiffAndPatch
49-
# 7z a -tzip XMLDiffAndPatch.zip XMLDiffAndPatch
40+
mkdir -p XMLDiffAndPatch
41+
cp -r XMLPatch\bin\Release\net8.0\win-x64\publish\XMLPatch.exe XMLDiffAndPatch
42+
cp -r XMLDiff\bin\Release\net8.0\win-x64\publish\XMLDiff.exe XMLDiffAndPatch
43+
7z a -tzip XMLDiffAndPatch.zip XMLDiffAndPatch
5044
shell: powershell
5145

52-
# # # Step 6: Upload Diff and Patch Archive as Artifact
53-
# - name: Upload Diff and Patch Archive as Artifact
54-
# uses: actions/upload-artifact@v4
55-
# with:
56-
# name: executables-archive
57-
# path: |
58-
# XMLDiffAndPatch.zip
59-
# env:
60-
# GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
46+
# Step 6: Upload Diff and Patch Archive as Artifact
47+
- name: Upload Diff and Patch Archive as Artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: executables-archive
51+
path: |
52+
XMLDiffAndPatch.zip
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
55+
56+
# Step 7: Attach Windows Diff and Patch Archive to Release
57+
- name: Attach Windows Diff and Patch Archive to Release
58+
uses: softprops/action-gh-release@v2
59+
if: ${{ github.event_name == 'release' }}
60+
with:
61+
files: XMLDiffAndPatch.zip
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
6164

62-
# Step 10: Scan with VirusTotal
63-
# -
64-
# name: VirusTotal Scan
65-
# uses: crazy-max/ghaction-virustotal@v4
66-
# with:
67-
# update_release_body: true
68-
# vt_api_key: ${{ secrets.VT_API_KEY }}
69-
# github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
70-
# request_rate: 4
71-
# files: |
72-
# ${{ github.event_name == 'release' && '.zip$' || '*.zip' }}
65+
# Step 8: Scan with VirusTotal
66+
-
67+
name: VirusTotal Scan
68+
uses: crazy-max/ghaction-virustotal@v4
69+
with:
70+
update_release_body: true
71+
vt_api_key: ${{ secrets.VT_API_KEY }}
72+
github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
73+
request_rate: 4
74+
files: |
75+
${{ github.event_name == 'release' && '.zip$' || '*.zip' }}

0 commit comments

Comments
 (0)