Closes #2532
[ArchiSteamFarm.git] / .github / workflows / publish.yml
blobdc067bffd6ce851277b249f864818f1472a92876
1 name: ASF-publish
3 on: [push, pull_request]
5 env:
6   ASF_PRIVATE_SNK: ${{ secrets.ASF_PRIVATE_SNK }}
7   CONFIGURATION: Release
8   DOTNET_CLI_TELEMETRY_OPTOUT: true
9   DOTNET_NOLOGO: true
10   DOTNET_SDK_VERSION: 6.0.x
11   NET_CORE_VERSION: net6.0
12   NET_FRAMEWORK_VERSION: net48
13   NODE_JS_VERSION: 'lts/*'
14   STEAM_TOKEN_DUMPER_NAME: ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
15   STEAM_TOKEN_DUMPER_TOKEN: ${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }}
17 jobs:
18   publish:
19     strategy:
20       fail-fast: false
21       matrix:
22         os: [macos-latest, ubuntu-latest, windows-2019]
24     runs-on: ${{ matrix.os }}
26     steps:
27     - name: Checkout code
28       uses: actions/checkout@v3.0.0
29       with:
30         submodules: recursive
32     - name: Setup .NET Core
33       uses: actions/setup-dotnet@v2.0.0
34       with:
35         dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
37     - name: Verify .NET Core
38       run: dotnet --info
40     - name: Setup Node.js with npm
41       uses: actions/setup-node@v3.0.0
42       with:
43         check-latest: true
44         node-version: ${{ env.NODE_JS_VERSION }}
46     - name: Verify Node.js
47       run: node -v
49     - name: Verify npm
50       run: npm -v
52     - name: Install npm modules for ASF-ui
53       run: npm ci --no-progress --prefix ASF-ui
55     - name: Publish ASF-ui
56       run: npm run-script deploy --no-progress --prefix ASF-ui
58     - name: Prepare private key for signing on Unix
59       if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
60       shell: sh
61       run: |
62         set -eu
64         if [ -n "${ASF_PRIVATE_SNK-}" ]; then
65             echo "$ASF_PRIVATE_SNK" | base64 -d > "resources/ArchiSteamFarm.snk"
66         fi
68     - name: Prepare private key for signing on Windows
69       if: startsWith(matrix.os, 'windows-')
70       shell: pwsh
71       run: |
72         Set-StrictMode -Version Latest
73         $ErrorActionPreference = 'Stop'
74         $ProgressPreference = 'SilentlyContinue'
76         if ((Test-Path env:ASF_PRIVATE_SNK) -and ($env:ASF_PRIVATE_SNK)) {
77             echo "$env:ASF_PRIVATE_SNK" > "resources\ArchiSteamFarm.snk"
79             certutil -f -decode "resources\ArchiSteamFarm.snk" "resources\ArchiSteamFarm.snk"
81             if ($LastExitCode -ne 0) {
82                 throw "Last command failed."
83             }
84         }
86     - name: Prepare ArchiSteamFarm.OfficialPlugins.SteamTokenDumper on Unix
87       if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
88       shell: sh
89       run: |
90         set -eu
92         if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" ]; then
93             sed "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs" > "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs.new"
94             mv "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs.new" "${STEAM_TOKEN_DUMPER_NAME}/SharedInfo.cs"
95         fi
97     - name: Prepare ArchiSteamFarm.OfficialPlugins.SteamTokenDumper on Windows
98       if: startsWith(matrix.os, 'windows-')
99       shell: pwsh
100       run: |
101         Set-StrictMode -Version Latest
102         $ErrorActionPreference = 'Stop'
103         $ProgressPreference = 'SilentlyContinue'
105         if ((Test-Path env:STEAM_TOKEN_DUMPER_TOKEN) -and ($env:STEAM_TOKEN_DUMPER_TOKEN) -and (Test-Path "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs" -PathType Leaf)) {
106             (Get-Content "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs").Replace('STEAM_TOKEN_DUMPER_TOKEN', "$env:STEAM_TOKEN_DUMPER_TOKEN") | Set-Content "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs"
107         }
109     - name: Publish ArchiSteamFarm.OfficialPlugins.SteamTokenDumper for .NET Core
110       run: dotnet publish "${{ env.STEAM_TOKEN_DUMPER_NAME }}" -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" -o "out/${{ env.STEAM_TOKEN_DUMPER_NAME }}/${{ env.NET_CORE_VERSION }}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --nologo
112     - name: Publish ArchiSteamFarm.OfficialPlugins.SteamTokenDumper for .NET Framework
113       if: startsWith(matrix.os, 'windows-')
114       run: dotnet publish "${{ env.STEAM_TOKEN_DUMPER_NAME }}" -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_FRAMEWORK_VERSION }}" -o "out/${{ env.STEAM_TOKEN_DUMPER_NAME }}/${{ env.NET_FRAMEWORK_VERSION }}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --nologo
116     - name: Restore packages in preparation for ArchiSteamFarm publishing
117       run: dotnet restore ArchiSteamFarm -p:ContinuousIntegrationBuild=true --nologo
119     - name: Publish ArchiSteamFarm on Unix
120       if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
121       env:
122         VARIANTS: generic linux-arm linux-arm64 linux-x64 osx-arm64 osx-x64 win-x64 # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
123       shell: sh
124       run: |
125         set -eu
127         publish() {
128             if [ "$1" = 'generic' ]; then
129                 variantArgs="-p:TargetLatestRuntimePatch=false -p:UseAppHost=false"
130             else
131                 variantArgs="-p:PublishSingleFile=true -p:PublishTrimmed=true -r $1 --self-contained"
132             fi
134             dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" "-p:ASFVariant=$1" -p:ContinuousIntegrationBuild=true --no-restore --nologo $variantArgs
136             # If we're including any overlay for this variant, copy it to output directory
137             variant_os="$(echo "$1" | cut -d '-' -f 1)"
139             if [ -d "ArchiSteamFarm/overlay/${variant_os}" ]; then
140                 cp -pR "ArchiSteamFarm/overlay/${variant_os}/"* "out/${1}"
141             fi
143             if [ "$1" != "$variant_os" ] && [ -d "ArchiSteamFarm/overlay/${1}" ]; then
144                 cp -pR "ArchiSteamFarm/overlay/${1}/"* "out/${1}"
145             fi
147             # If we're including SteamTokenDumper plugin for this framework, copy it to output directory
148             if [ -d "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" ]; then
149                 mkdir -p "out/${1}/plugins/${STEAM_TOKEN_DUMPER_NAME}"
150                 cp -pR "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/"* "out/${1}/plugins/${STEAM_TOKEN_DUMPER_NAME}"
151             fi
153             # Include .ico file for all platforms, since only Windows script can bundle it inside the exe
154             cp "resources/ASF.ico" "out/${1}/ArchiSteamFarm.ico"
156             # By default use fastest compression
157             seven_zip_args="-mx=1"
158             zip_args="-1"
160             # Include extra logic for builds marked for release
161             case "$GITHUB_REF" in
162                 "refs/tags/"*)
163                     # Tweak compression args for release publishing
164                     seven_zip_args="-mx=9 -mfb=258 -mpass=15"
165                     zip_args="-9"
167                     # Update link in Changelog.html accordingly
168                     if [ -f "out/${1}/Changelog.html" ]; then
169                         tag="$(echo "$GITHUB_REF" | cut -c 11-)"
171                         sed "s/ArchiSteamFarm\/commits\/main/ArchiSteamFarm\/releases\/tag\/${tag}/g" "out/${1}/Changelog.html" > "out/${1}/Changelog.html.new"
172                         mv "out/${1}/Changelog.html.new" "out/${1}/Changelog.html"
173                     fi
174                     ;;
175             esac
177             # Create the final zip file
178             case "$(uname -s)" in
179                 "Darwin")
180                     # We prefer to use zip on OS X as 7z implementation on that OS doesn't handle file permissions (chmod +x)
181                     if command -v zip >/dev/null; then
182                         (
183                             cd "${GITHUB_WORKSPACE}/out/${1}"
184                             zip -q -r $zip_args "../ASF-${1}.zip" .
185                         )
186                     elif command -v 7z >/dev/null; then
187                         7z a -bd -slp -tzip -mm=Deflate $seven_zip_args "out/ASF-${1}.zip" "${GITHUB_WORKSPACE}/out/${1}/*"
188                     else
189                         echo "ERROR: No supported zip tool!"
190                         return 1
191                     fi
192                     ;;
193                 *)
194                     if command -v 7z >/dev/null; then
195                         7z a -bd -slp -tzip -mm=Deflate $seven_zip_args "out/ASF-${1}.zip" "${GITHUB_WORKSPACE}/out/${1}/*"
196                     elif command -v zip >/dev/null; then
197                         (
198                             cd "${GITHUB_WORKSPACE}/out/${1}"
199                             zip -q -r $zip_args "../ASF-${1}.zip" .
200                         )
201                     else
202                         echo "ERROR: No supported zip tool!"
203                         return 1
204                     fi
205                     ;;
206             esac
207         }
209         jobs=""
211         for variant in $VARIANTS; do
212             publish "$variant" &
213             jobs="$jobs $!"
214         done
216         for job in $jobs; do
217             wait "$job"
218         done
220     - name: Publish ArchiSteamFarm on Windows
221       if: startsWith(matrix.os, 'windows-')
222       env:
223         VARIANTS: generic generic-netf linux-arm linux-arm64 linux-x64 osx-arm64 osx-x64 win-x64 # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
224       shell: pwsh
225       run: |
226         Set-StrictMode -Version Latest
227         $ErrorActionPreference = 'Stop'
228         $ProgressPreference = 'SilentlyContinue'
230         $PublishBlock = {
231             param($variant)
233             Set-StrictMode -Version Latest
234             $ErrorActionPreference = 'Stop'
235             $ProgressPreference = 'SilentlyContinue'
237             Set-Location "$env:GITHUB_WORKSPACE"
239             if ($variant -like '*-netf') {
240                 $targetFramework = $env:NET_FRAMEWORK_VERSION
241             } else {
242                 $targetFramework = $env:NET_CORE_VERSION
243             }
245             if ($variant -like 'generic*') {
246                 $variantArgs = '-p:TargetLatestRuntimePatch=false', '-p:UseAppHost=false'
247             } else {
248                 $variantArgs = '-p:PublishSingleFile=true', '-p:PublishTrimmed=true', '-r', "$variant", '--self-contained'
249             }
251             dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" "-p:ASFVariant=$variant" -p:ContinuousIntegrationBuild=true --no-restore --nologo $variantArgs
253             if ($LastExitCode -ne 0) {
254                 throw "Last command failed."
255             }
257             # If we're including any overlay for this variant, copy it to output directory
258             $variant_os = $variant.Split('-', 2)[0];
260             if (Test-Path "ArchiSteamFarm\overlay\$variant_os" -PathType Container) {
261                 Copy-Item "ArchiSteamFarm\overlay\$variant_os\*" "out\$variant" -Recurse
262             }
264             if (($variant -ne $variant_os) -and (Test-Path "ArchiSteamFarm\overlay\$variant" -PathType Container)) {
265                 Copy-Item "ArchiSteamFarm\overlay\$variant\*" "out\$variant" -Recurse
266             }
268             # If we're including SteamTokenDumper plugin for this framework, copy it to output directory
269             if (Test-Path "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework" -PathType Container) {
270                 if (!(Test-Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" -PathType Container)) {
271                     New-Item -ItemType Directory -Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" > $null
272                 }
274                 Copy-Item "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\*" "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" -Recurse
275             }
277             # Icon is available only in .NET Framework and .NET Core Windows build, we'll bundle the .ico file for other flavours
278             if (($targetFramework -eq "$env:NET_CORE_VERSION") -and !(Test-Path "out\$variant\ArchiSteamFarm.exe" -PathType Leaf)) {
279                 Copy-Item 'resources\ASF.ico' "out\$variant\ArchiSteamFarm.ico"
280             }
282             # By default use fastest compression
283             $compressionArgs = '-mx=1'
285             # Include extra logic for builds marked for release
286             if ($env:GITHUB_REF -like 'refs/tags/*') {
287                 # Tweak compression args for release publishing
288                 $compressionArgs = '-mx=9', '-mfb=258', '-mpass=15'
290                 # Update link in Changelog.html accordingly
291                 if (Test-Path "out\$variant\Changelog.html" -PathType Leaf) {
292                     $tag = $env:GITHUB_REF.Substring(10)
294                     (Get-Content "out\$variant\Changelog.html").Replace('ArchiSteamFarm/commits/main', "ArchiSteamFarm/releases/tag/$tag") | Set-Content "out\$variant\Changelog.html"
295                 }
296             }
298             # Create the final zip file
299             7z a -bd -slp -tzip -mm=Deflate $compressionArgs "out\ASF-$variant.zip" "$env:GITHUB_WORKSPACE\out\$variant\*"
301             if ($LastExitCode -ne 0) {
302                 throw "Last command failed."
303             }
305             # We can aid non-windows users by adding chmod +x flag to appropriate executables directly in the zip file
306             # This is ALMOST a hack, but works reliably enough
307             if (Test-Path "tools\zip_exec\zip_exec.exe" -PathType Leaf) {
308                 $executableFiles = @()
310                 if ($variant -like 'generic*') {
311                     $executableFiles += 'ArchiSteamFarm.sh', 'ArchiSteamFarm-Service.sh'
312                 } elseif (($variant -like 'linux*') -or ($variant -like 'osx*')) {
313                     $executableFiles += 'ArchiSteamFarm', 'ArchiSteamFarm-Service.sh'
314                 }
316                 foreach ($executableFile in $executableFiles) {
317                     tools\zip_exec\zip_exec.exe "out\ASF-$variant.zip" "$executableFile"
319                     if ($LastExitCode -ne 0) {
320                         throw "Last command failed."
321                     }
322                 }
323             }
324         }
326         foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
327             Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant"
329             # Limit active jobs in parallel to help with memory usage
330             $jobs = $(Get-Job -State Running)
332             while (@($jobs).Count -ge 5) {
333                 Wait-Job -Job $jobs -Any | Out-Null
335                 $jobs = $(Get-Job -State Running)
336             }
337         }
339         Get-Job | Receive-Job -Wait
341     - name: Upload ASF-generic
342       continue-on-error: true
343       uses: actions/upload-artifact@v3.0.0
344       with:
345         name: ${{ matrix.os }}_ASF-generic
346         path: out/ASF-generic.zip
348     - name: Upload ASF-generic-netf
349       continue-on-error: true
350       if: startsWith(matrix.os, 'windows-')
351       uses: actions/upload-artifact@v3.0.0
352       with:
353         name: ${{ matrix.os }}_ASF-generic-netf
354         path: out/ASF-generic-netf.zip
356     - name: Upload ASF-linux-arm
357       continue-on-error: true
358       uses: actions/upload-artifact@v3.0.0
359       with:
360         name: ${{ matrix.os }}_ASF-linux-arm
361         path: out/ASF-linux-arm.zip
363     - name: Upload ASF-linux-arm64
364       continue-on-error: true
365       uses: actions/upload-artifact@v3.0.0
366       with:
367         name: ${{ matrix.os }}_ASF-linux-arm64
368         path: out/ASF-linux-arm64.zip
370     - name: Upload ASF-linux-x64
371       continue-on-error: true
372       uses: actions/upload-artifact@v3.0.0
373       with:
374         name: ${{ matrix.os }}_ASF-linux-x64
375         path: out/ASF-linux-x64.zip
377     - name: Upload ASF-osx-arm64
378       continue-on-error: true
379       uses: actions/upload-artifact@v3.0.0
380       with:
381         name: ${{ matrix.os }}_ASF-osx-arm64
382         path: out/ASF-osx-arm64.zip
384     - name: Upload ASF-osx-x64
385       continue-on-error: true
386       uses: actions/upload-artifact@v3.0.0
387       with:
388         name: ${{ matrix.os }}_ASF-osx-x64
389         path: out/ASF-osx-x64.zip
391     - name: Upload ASF-win-x64
392       continue-on-error: true
393       uses: actions/upload-artifact@v3.0.0
394       with:
395         name: ${{ matrix.os }}_ASF-win-x64
396         path: out/ASF-win-x64.zip
398   release:
399     if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
400     needs: publish
401     runs-on: ubuntu-latest
403     steps:
404     - name: Checkout code
405       uses: actions/checkout@v3.0.0
407     # TODO: It'd be perfect if we could match final artifacts to the platform they target, so e.g. linux build comes from the linux machine
408     # However, that is currently impossible due to https://github.com/dotnet/msbuild/issues/3897
409     # Therefore, we'll (sadly) pull artifacts from Windows machine only for now
410     - name: Download ASF-generic artifact from windows-2019
411       uses: actions/download-artifact@v3.0.0
412       with:
413         name: windows-2019_ASF-generic
414         path: out
416     - name: Download ASF-generic-netf artifact from windows-2019
417       uses: actions/download-artifact@v3.0.0
418       with:
419         name: windows-2019_ASF-generic-netf
420         path: out
422     - name: Download ASF-linux-arm artifact from windows-2019
423       uses: actions/download-artifact@v3.0.0
424       with:
425         name: windows-2019_ASF-linux-arm
426         path: out
428     - name: Download ASF-linux-arm64 artifact from windows-2019
429       uses: actions/download-artifact@v3.0.0
430       with:
431         name: windows-2019_ASF-linux-arm64
432         path: out
434     - name: Download ASF-linux-x64 artifact from windows-2019
435       uses: actions/download-artifact@v3.0.0
436       with:
437         name: windows-2019_ASF-linux-x64
438         path: out
440     - name: Download ASF-osx-arm64 artifact from windows-2019
441       uses: actions/download-artifact@v3.0.0
442       with:
443         name: windows-2019_ASF-osx-arm64
444         path: out
446     - name: Download ASF-osx-x64 artifact from windows-2019
447       uses: actions/download-artifact@v3.0.0
448       with:
449         name: windows-2019_ASF-osx-x64
450         path: out
452     - name: Download ASF-win-x64 artifact from windows-2019
453       uses: actions/download-artifact@v3.0.0
454       with:
455         name: windows-2019_ASF-win-x64
456         path: out
458     - name: Import GPG key for signing
459       uses: crazy-max/ghaction-import-gpg@v4.2.0
460       with:
461         gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
463     - name: Generate SHA-512 checksums and signature
464       shell: sh
465       run: |
466         set -eu
468         (
469             cd "out"
471             sha512sum *.zip > SHA512SUMS
472             gpg -a -b -o SHA512SUMS.sign SHA512SUMS
473         )
475     - name: Upload SHA512SUMS
476       continue-on-error: true
477       uses: actions/upload-artifact@v3.0.0
478       with:
479         name: SHA512SUMS
480         path: out/SHA512SUMS
482     - name: Upload SHA512SUMS.sign
483       continue-on-error: true
484       uses: actions/upload-artifact@v3.0.0
485       with:
486         name: SHA512SUMS.sign
487         path: out/SHA512SUMS.sign
489     - name: Create ArchiSteamFarm GitHub release
490       id: github_release
491       uses: actions/create-release@v1.1.4
492       env:
493         GITHUB_TOKEN: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
494       with:
495         tag_name: ${{ github.ref }}
496         release_name: ArchiSteamFarm V${{ github.ref }}
497         body_path: .github/RELEASE_TEMPLATE.md
498         prerelease: true
500     - name: Upload ASF-generic to GitHub release
501       uses: actions/upload-release-asset@v1.0.2
502       env:
503         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
504       with:
505         upload_url: ${{ steps.github_release.outputs.upload_url }}
506         asset_path: out/ASF-generic.zip
507         asset_name: ASF-generic.zip
508         asset_content_type: application/zip
510     - name: Upload ASF-generic-netf to GitHub release
511       uses: actions/upload-release-asset@v1.0.2
512       env:
513         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
514       with:
515         upload_url: ${{ steps.github_release.outputs.upload_url }}
516         asset_path: out/ASF-generic-netf.zip
517         asset_name: ASF-generic-netf.zip
518         asset_content_type: application/zip
520     - name: Upload ASF-linux-arm to GitHub release
521       uses: actions/upload-release-asset@v1.0.2
522       env:
523         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
524       with:
525         upload_url: ${{ steps.github_release.outputs.upload_url }}
526         asset_path: out/ASF-linux-arm.zip
527         asset_name: ASF-linux-arm.zip
528         asset_content_type: application/zip
530     - name: Upload ASF-linux-arm64 to GitHub release
531       uses: actions/upload-release-asset@v1.0.2
532       env:
533         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
534       with:
535         upload_url: ${{ steps.github_release.outputs.upload_url }}
536         asset_path: out/ASF-linux-arm64.zip
537         asset_name: ASF-linux-arm64.zip
538         asset_content_type: application/zip
540     - name: Upload ASF-linux-x64 to GitHub release
541       uses: actions/upload-release-asset@v1.0.2
542       env:
543         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
544       with:
545         upload_url: ${{ steps.github_release.outputs.upload_url }}
546         asset_path: out/ASF-linux-x64.zip
547         asset_name: ASF-linux-x64.zip
548         asset_content_type: application/zip
550     - name: Upload ASF-osx-arm64 to GitHub release
551       uses: actions/upload-release-asset@v1.0.2
552       env:
553         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
554       with:
555         upload_url: ${{ steps.github_release.outputs.upload_url }}
556         asset_path: out/ASF-osx-arm64.zip
557         asset_name: ASF-osx-arm64.zip
558         asset_content_type: application/zip
560     - name: Upload ASF-osx-x64 to GitHub release
561       uses: actions/upload-release-asset@v1.0.2
562       env:
563         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
564       with:
565         upload_url: ${{ steps.github_release.outputs.upload_url }}
566         asset_path: out/ASF-osx-x64.zip
567         asset_name: ASF-osx-x64.zip
568         asset_content_type: application/zip
570     - name: Upload ASF-win-x64 to GitHub release
571       uses: actions/upload-release-asset@v1.0.2
572       env:
573         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
574       with:
575         upload_url: ${{ steps.github_release.outputs.upload_url }}
576         asset_path: out/ASF-win-x64.zip
577         asset_name: ASF-win-x64.zip
578         asset_content_type: application/zip
580     - name: Upload SHA512SUMS to GitHub release
581       uses: actions/upload-release-asset@v1.0.2
582       env:
583         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
584       with:
585         upload_url: ${{ steps.github_release.outputs.upload_url }}
586         asset_path: out/SHA512SUMS
587         asset_name: SHA512SUMS
588         asset_content_type: text/plain
590     - name: Upload SHA512SUMS.sign to GitHub release
591       uses: actions/upload-release-asset@v1.0.2
592       env:
593         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
594       with:
595         upload_url: ${{ steps.github_release.outputs.upload_url }}
596         asset_path: out/SHA512SUMS.sign
597         asset_name: SHA512SUMS.sign
598         asset_content_type: text/plain