2021-05-20 21:36:02 +00:00
name : ASF-publish
on : [ push, pull_request]
env :
2021-08-01 10:56:08 +00:00
ASF_PRIVATE_SNK : ${{ secrets.ASF_PRIVATE_SNK }}
2021-05-20 21:36:02 +00:00
CONFIGURATION : Release
2021-11-08 22:41:02 +00:00
DOTNET_CLI_TELEMETRY_OPTOUT : true
DOTNET_NOLOGO : true
2022-11-14 22:38:56 +00:00
DOTNET_SDK_VERSION : 7.0 .x
NET_CORE_VERSION : net7.0
2022-09-07 21:25:45 +00:00
NET_FRAMEWORK_VERSION : net481
2021-06-30 14:26:33 +00:00
NODE_JS_VERSION : 'lts/*'
2022-12-15 17:46:37 +00:00
PLUGINS : ArchiSteamFarm.OfficialPlugins.ItemsMatcher ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
2021-05-20 21:36:02 +00:00
STEAM_TOKEN_DUMPER_TOKEN : ${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }}
jobs :
2021-08-01 19:31:49 +00:00
publish :
2021-05-20 21:36:02 +00:00
strategy :
fail-fast : false
matrix :
2022-04-04 20:06:03 +00:00
os : [ macos-latest, ubuntu-latest, windows-latest]
2021-05-20 21:36:02 +00:00
runs-on : ${{ matrix.os }}
steps :
- name : Checkout code
2023-01-05 16:47:18 +00:00
uses : actions/checkout@v3.3.0
2021-05-20 21:36:02 +00:00
with :
submodules : recursive
- name : Setup .NET Core
2022-10-27 14:46:42 +00:00
uses : actions/setup-dotnet@v3.0.3
2021-05-20 21:36:02 +00:00
with :
dotnet-version : ${{ env.DOTNET_SDK_VERSION }}
- name : Verify .NET Core
run : dotnet --info
- name : Setup Node.js with npm
2023-01-05 19:47:53 +00:00
uses : actions/setup-node@v3.6.0
2021-05-20 21:36:02 +00:00
with :
check-latest : true
node-version : ${{ env.NODE_JS_VERSION }}
- name : Verify Node.js
run : node -v
- name : Verify npm
run : npm -v
- name : Install npm modules for ASF-ui
run : npm ci --no-progress --prefix ASF-ui
- name : Publish ASF-ui
run : npm run-script deploy --no-progress --prefix ASF-ui
2021-08-01 10:56:08 +00:00
- name : Prepare private key for signing on Unix
if : startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
shell : sh
run : |
2021-08-01 11:00:14 +00:00
set -eu
if [ -n "${ASF_PRIVATE_SNK-}" ]; then
echo "$ASF_PRIVATE_SNK" | base64 -d > "resources/ArchiSteamFarm.snk"
fi
2021-08-01 10:56:08 +00:00
- name : Prepare private key for signing on Windows
if : startsWith(matrix.os, 'windows-')
shell : pwsh
run : |
2021-08-01 11:00:14 +00:00
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
2021-08-01 10:56:08 +00:00
2021-08-01 17:14:56 +00:00
if ((Test-Path env:ASF_PRIVATE_SNK) -and ($env:ASF_PRIVATE_SNK)) {
2021-08-01 11:00:14 +00:00
echo "$env:ASF_PRIVATE_SNK" > "resources\ArchiSteamFarm.snk"
2021-08-01 10:56:08 +00:00
2021-08-01 11:00:14 +00:00
certutil -f -decode "resources\ArchiSteamFarm.snk" "resources\ArchiSteamFarm.snk"
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
}
2021-08-01 10:56:08 +00:00
2022-12-15 17:46:37 +00:00
- name : Prepare for publishing on Unix
if : startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
shell : bash
run : |
set -euo pipefail
dotnet restore
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
- name : Prepare for publishing on Windows
if : startsWith(matrix.os, 'windows-')
shell : pwsh
run : |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
dotnet restore
dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
2021-05-20 21:36:02 +00:00
- name : Prepare ArchiSteamFarm.OfficialPlugins.SteamTokenDumper on Unix
if : startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
shell : sh
run : |
2021-08-01 11:00:14 +00:00
set -eu
2022-12-15 17:46:37 +00:00
if [ -n "${STEAM_TOKEN_DUMPER_TOKEN-}" ] && [ -f "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs" ]; then
sed "s/STEAM_TOKEN_DUMPER_TOKEN/${STEAM_TOKEN_DUMPER_TOKEN}/g" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs" > "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs.new"
mv "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs.new" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SharedInfo.cs"
2021-08-01 11:00:14 +00:00
fi
2021-05-20 21:36:02 +00:00
- name : Prepare ArchiSteamFarm.OfficialPlugins.SteamTokenDumper on Windows
if : startsWith(matrix.os, 'windows-')
shell : pwsh
run : |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
2022-12-15 17:46:37 +00:00
if ((Test-Path env:STEAM_TOKEN_DUMPER_TOKEN) -and ($env:STEAM_TOKEN_DUMPER_TOKEN) -and (Test-Path "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper\SharedInfo.cs" -PathType Leaf)) {
(Get-Content "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper\SharedInfo.cs").Replace('STEAM_TOKEN_DUMPER_TOKEN', "$env:STEAM_TOKEN_DUMPER_TOKEN") | Set-Content "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper\SharedInfo.cs"
}
- name : Publish official plugins on Unix
if : startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
env :
MAX_JOBS : 3
shell : bash
run : |
set -euo pipefail
publish() {
dotnet publish "$1" -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}/${NET_CORE_VERSION}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
2021-05-20 21:36:02 +00:00
}
2022-12-15 17:46:37 +00:00
for plugin in $PLUGINS; do
publish "$plugin" &
2021-05-20 21:36:02 +00:00
2022-12-15 17:46:37 +00:00
while [ "$(jobs -p | wc -l)" -ge "$MAX_JOBS" ]; do
sleep 1
done
done
wait
- name : Publish official plugins on Windows
2021-05-20 21:36:02 +00:00
if : startsWith(matrix.os, 'windows-')
2022-12-15 17:46:37 +00:00
env :
MAX_JOBS : 2
shell : pwsh
run : |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$PublishBlock = {
param($plugin, $framework)
2021-05-20 21:36:02 +00:00
2022-12-15 17:46:37 +00:00
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Set-Location "$env:GITHUB_WORKSPACE"
dotnet publish "$plugin" -c "$env:CONFIGURATION" -f "$framework" -o "out\$plugin\$framework" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
}
foreach ($plugin in $env:PLUGINS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
foreach ($framework in "$env:NET_CORE_VERSION","$env:NET_FRAMEWORK_VERSION") {
Start-Job -Name "$plugin $framework" $PublishBlock -ArgumentList "$plugin","$framework"
# Limit active jobs in parallel to help with memory usage
$jobs = $(Get-Job -State Running)
while (@($jobs).Count -ge $env:MAX_JOBS) {
Wait-Job -Job $jobs -Any | Out-Null
$jobs = $(Get-Job -State Running)
}
}
}
Get-Job | Receive-Job -Wait
2021-05-20 21:36:02 +00:00
- name : Publish ArchiSteamFarm on Unix
if : startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
env :
2022-11-17 09:59:31 +00:00
MAX_JOBS : 3
2021-11-10 19:36:09 +00:00
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!
2022-11-16 12:41:26 +00:00
shell : bash
2021-05-20 21:36:02 +00:00
run : |
2022-11-16 12:41:26 +00:00
set -euo pipefail
2021-05-20 21:36:02 +00:00
publish() {
if [ "$1" = 'generic' ]; then
2021-09-25 22:12:15 +00:00
variantArgs="-p:TargetLatestRuntimePatch=false -p:UseAppHost=false"
2021-05-20 21:36:02 +00:00
else
2021-11-10 18:39:04 +00:00
variantArgs="-p:PublishSingleFile=true -p:PublishTrimmed=true -r $1 --self-contained"
2021-05-20 21:36:02 +00:00
fi
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" "-p:ASFVariant=$1" -p:ContinuousIntegrationBuild=true --no-restore --nologo $variantArgs
2022-12-15 17:46:37 +00:00
# If we're including official plugins for this framework, copy them to output directory
for plugin in $PLUGINS; do
if [ -d "out/${plugin}/${NET_CORE_VERSION}" ]; then
mkdir -p "out/${1}/plugins/${plugin}"
cp -pR "out/${plugin}/${NET_CORE_VERSION}/"* "out/${1}/plugins/${plugin}"
fi
done
2021-05-20 21:36:02 +00:00
# Include .ico file for all platforms, since only Windows script can bundle it inside the exe
cp "resources/ASF.ico" "out/${1}/ArchiSteamFarm.ico"
2021-08-01 19:31:49 +00:00
# By default use fastest compression
seven_zip_args="-mx=1"
zip_args="-1"
# Include extra logic for builds marked for release
case "$GITHUB_REF" in
"refs/tags/" *)
# Tweak compression args for release publishing
seven_zip_args="-mx=9 -mfb=258 -mpass=15"
zip_args="-9"
# Update link in Changelog.html accordingly
if [ -f "out/${1}/Changelog.html" ]; then
tag="$(echo "$GITHUB_REF" | cut -c 11-)"
sed "s/ArchiSteamFarm\/commits\/main/ArchiSteamFarm\/releases\/tag\/${tag}/g" "out/${1}/Changelog.html" > "out/${1}/Changelog.html.new"
mv "out/${1}/Changelog.html.new" "out/${1}/Changelog.html"
fi
;;
esac
# Create the final zip file
2021-08-01 20:03:43 +00:00
case "$(uname -s)" in
"Darwin" )
2022-04-15 17:37:18 +00:00
# We prefer to use zip on macOS as 7z implementation on that OS doesn't handle file permissions (chmod +x)
2021-08-01 20:03:43 +00:00
if command -v zip >/dev/null; then
(
cd "${GITHUB_WORKSPACE}/out/${1}"
zip -q -r $zip_args "../ASF-${1}.zip" .
)
elif command -v 7z >/dev/null; then
7z a -bd -slp -tzip -mm=Deflate $seven_zip_args "out/ASF-${1}.zip" "${GITHUB_WORKSPACE}/out/${1}/*"
else
echo "ERROR: No supported zip tool!"
return 1
fi
;;
*)
if command -v 7z >/dev/null; then
7z a -bd -slp -tzip -mm=Deflate $seven_zip_args "out/ASF-${1}.zip" "${GITHUB_WORKSPACE}/out/${1}/*"
elif command -v zip >/dev/null; then
(
cd "${GITHUB_WORKSPACE}/out/${1}"
zip -q -r $zip_args "../ASF-${1}.zip" .
)
else
echo "ERROR: No supported zip tool!"
return 1
fi
;;
esac
2021-05-20 21:36:02 +00:00
}
for variant in $VARIANTS; do
2022-11-14 23:12:41 +00:00
publish "$variant" &
2022-11-16 12:41:26 +00:00
while [ "$(jobs -p | wc -l)" -ge "$MAX_JOBS" ]; do
2022-11-16 12:48:59 +00:00
sleep 1
2022-11-14 22:38:56 +00:00
done
2021-05-20 21:36:02 +00:00
done
2022-11-14 22:38:56 +00:00
wait
2021-05-20 21:36:02 +00:00
- name : Publish ArchiSteamFarm on Windows
if : startsWith(matrix.os, 'windows-')
env :
2022-11-16 21:40:27 +00:00
MAX_JOBS : 2
2021-11-10 19:36:09 +00:00
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!
2021-05-20 21:36:02 +00:00
shell : pwsh
run : |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$PublishBlock = {
param($variant)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Set-Location "$env:GITHUB_WORKSPACE"
if ($variant -like '*-netf') {
$targetFramework = $env:NET_FRAMEWORK_VERSION
} else {
$targetFramework = $env:NET_CORE_VERSION
}
if ($variant -like 'generic*') {
$variantArgs = '-p:TargetLatestRuntimePatch=false', '-p:UseAppHost=false'
} else {
2021-11-10 18:39:04 +00:00
$variantArgs = '-p:PublishSingleFile=true', '-p:PublishTrimmed=true', '-r', "$variant", '--self-contained'
2021-05-20 21:36:02 +00:00
}
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" "-p:ASFVariant=$variant" -p:ContinuousIntegrationBuild=true --no-restore --nologo $variantArgs
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
2022-12-15 17:46:37 +00:00
# If we're including official plugins for this framework, copy them to output directory
foreach ($plugin in $env:PLUGINS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
if (Test-Path "out\$plugin\$targetFramework" -PathType Container) {
if (!(Test-Path "out\$variant\plugins\$plugin" -PathType Container)) {
New-Item -ItemType Directory -Path "out\$variant\plugins\$plugin" > $null
}
2021-05-20 21:36:02 +00:00
2022-12-15 17:46:37 +00:00
Copy-Item "out\$plugin\$targetFramework\*" "out\$variant\plugins\$plugin" -Recurse
}
2021-05-20 21:36:02 +00:00
}
# Icon is available only in .NET Framework and .NET Core Windows build, we'll bundle the .ico file for other flavours
if (($targetFramework -eq "$env:NET_CORE_VERSION") -and !(Test-Path "out\$variant\ArchiSteamFarm.exe" -PathType Leaf)) {
Copy-Item 'resources\ASF.ico' "out\$variant\ArchiSteamFarm.ico"
}
# By default use fastest compression
$compressionArgs = '-mx=1'
# Include extra logic for builds marked for release
if ($env:GITHUB_REF -like 'refs/tags/*') {
# Tweak compression args for release publishing
$compressionArgs = '-mx=9', '-mfb=258', '-mpass=15'
# Update link in Changelog.html accordingly
if (Test-Path "out\$variant\Changelog.html" -PathType Leaf) {
2021-08-01 19:31:49 +00:00
$tag = $env:GITHUB_REF.Substring(10)
2021-05-20 21:36:02 +00:00
(Get-Content "out\$variant\Changelog.html").Replace('ArchiSteamFarm/commits/main', "ArchiSteamFarm/releases/tag/$tag") | Set-Content "out\$variant\Changelog.html"
}
}
2021-08-01 19:31:49 +00:00
# Create the final zip file
2021-05-20 21:36:02 +00:00
7z a -bd -slp -tzip -mm=Deflate $compressionArgs "out\ASF-$variant.zip" "$env:GITHUB_WORKSPACE\out\$variant\*"
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
2021-08-01 17:27:16 +00:00
# We can aid non-windows users by adding chmod +x flag to appropriate executables directly in the zip file
# This is ALMOST a hack, but works reliably enough
if (Test-Path "tools\zip_exec\zip_exec.exe" -PathType Leaf) {
$executableFiles = @()
2021-09-05 20:16:40 +00:00
if ($variant -like 'generic*') {
2021-08-01 17:27:16 +00:00
$executableFiles += 'ArchiSteamFarm.sh', 'ArchiSteamFarm-Service.sh'
} elseif (($variant -like 'linux*') -or ($variant -like 'osx*')) {
$executableFiles += 'ArchiSteamFarm', 'ArchiSteamFarm-Service.sh'
}
foreach ($executableFile in $executableFiles) {
tools\zip_exec\zip_exec.exe "out\ASF-$variant.zip" "$executableFile"
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
}
}
2021-05-20 21:36:02 +00:00
}
foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant"
2021-12-17 13:09:55 +00:00
# Limit active jobs in parallel to help with memory usage
$jobs = $(Get-Job -State Running)
2022-11-14 22:38:56 +00:00
while (@($jobs).Count -ge $env:MAX_JOBS) {
2021-12-17 13:09:55 +00:00
Wait-Job -Job $jobs -Any | Out-Null
$jobs = $(Get-Job -State Running)
}
2021-05-20 21:36:02 +00:00
}
2021-12-18 16:50:45 +00:00
Get-Job | Receive-Job -Wait
2021-05-20 21:36:02 +00:00
- name : Upload ASF-generic
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-generic
path : out/ASF-generic.zip
- name : Upload ASF-generic-netf
if : startsWith(matrix.os, 'windows-')
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-generic-netf
path : out/ASF-generic-netf.zip
- name : Upload ASF-linux-arm
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-linux-arm
path : out/ASF-linux-arm.zip
- name : Upload ASF-linux-arm64
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-linux-arm64
path : out/ASF-linux-arm64.zip
- name : Upload ASF-linux-x64
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-linux-x64
path : out/ASF-linux-x64.zip
2021-11-10 19:36:09 +00:00
- name : Upload ASF-osx-arm64
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-11-10 19:36:09 +00:00
with :
name : ${{ matrix.os }}_ASF-osx-arm64
path : out/ASF-osx-arm64.zip
2021-05-20 21:36:02 +00:00
- name : Upload ASF-osx-x64
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-osx-x64
path : out/ASF-osx-x64.zip
- name : Upload ASF-win-x64
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-05-20 21:36:02 +00:00
with :
name : ${{ matrix.os }}_ASF-win-x64
path : out/ASF-win-x64.zip
2021-08-01 19:31:49 +00:00
release :
if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
needs : publish
runs-on : ubuntu-latest
steps :
- name : Checkout code
2023-01-05 16:47:18 +00:00
uses : actions/checkout@v3.3.0
2021-08-01 19:31:49 +00:00
2022-11-14 23:27:52 +00:00
- name : Download ASF-generic artifact from ubuntu-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-11-14 23:27:52 +00:00
name : ubuntu-latest_ASF-generic
2021-08-01 19:31:49 +00:00
path : out
2022-04-04 20:06:03 +00:00
- name : Download ASF-generic-netf artifact from windows-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-04-04 20:06:03 +00:00
name : windows-latest_ASF-generic-netf
2021-08-01 19:31:49 +00:00
path : out
2022-11-14 23:27:52 +00:00
- name : Download ASF-linux-arm artifact from ubuntu-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-11-14 23:27:52 +00:00
name : ubuntu-latest_ASF-linux-arm
2021-08-01 19:31:49 +00:00
path : out
2022-11-14 23:27:52 +00:00
- name : Download ASF-linux-arm64 artifact from ubuntu-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-11-14 23:27:52 +00:00
name : ubuntu-latest_ASF-linux-arm64
2021-08-01 19:31:49 +00:00
path : out
2022-11-14 23:27:52 +00:00
- name : Download ASF-linux-x64 artifact from ubuntu-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-11-14 23:27:52 +00:00
name : ubuntu-latest_ASF-linux-x64
2021-08-01 19:31:49 +00:00
path : out
2022-11-17 13:31:33 +00:00
- name : Download ASF-osx-arm64 artifact from macos-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-11-10 19:36:09 +00:00
with :
2022-11-17 13:31:33 +00:00
name : macos-latest_ASF-osx-arm64
2021-11-10 19:36:09 +00:00
path : out
2022-11-17 13:31:33 +00:00
- name : Download ASF-osx-x64 artifact from macos-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-11-17 13:31:33 +00:00
name : macos-latest_ASF-osx-x64
2021-08-01 19:31:49 +00:00
path : out
2022-04-04 20:06:03 +00:00
- name : Download ASF-win-x64 artifact from windows-latest
2023-01-06 08:08:14 +00:00
uses : actions/download-artifact@v3.0.2
2021-08-01 19:31:49 +00:00
with :
2022-04-04 20:06:03 +00:00
name : windows-latest_ASF-win-x64
2021-08-01 19:31:49 +00:00
path : out
2021-08-01 22:45:58 +00:00
- name : Import GPG key for signing
2022-10-18 22:39:20 +00:00
uses : crazy-max/ghaction-import-gpg@v5.2.0
2021-08-01 22:45:58 +00:00
with :
2021-09-05 00:36:12 +00:00
gpg_private_key : ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
2021-08-01 22:45:58 +00:00
- name : Generate SHA-512 checksums and signature
shell : sh
run : |
set -eu
(
cd "out"
sha512sum *.zip > SHA512SUMS
gpg -a -b -o SHA512SUMS.sign SHA512SUMS
)
- name : Upload SHA512SUMS
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-08-01 22:45:58 +00:00
with :
name : SHA512SUMS
path : out/SHA512SUMS
- name : Upload SHA512SUMS.sign
2023-01-07 03:15:50 +00:00
uses : actions/upload-artifact@v3.1.2
2021-08-01 22:45:58 +00:00
with :
name : SHA512SUMS.sign
path : out/SHA512SUMS.sign
2021-05-20 21:36:02 +00:00
- name : Create ArchiSteamFarm GitHub release
id : github_release
2021-06-30 14:19:41 +00:00
uses : actions/create-release@v1.1.4
2021-05-20 21:36:02 +00:00
env :
2021-10-24 17:08:08 +00:00
GITHUB_TOKEN : ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
2021-05-20 21:36:02 +00:00
with :
tag_name : ${{ github.ref }}
release_name : ArchiSteamFarm V${{ github.ref }}
body_path : .github/RELEASE_TEMPLATE.md
prerelease : true
- name : Upload ASF-generic to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-generic.zip
asset_name : ASF-generic.zip
asset_content_type : application/zip
- name : Upload ASF-generic-netf to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-generic-netf.zip
asset_name : ASF-generic-netf.zip
asset_content_type : application/zip
- name : Upload ASF-linux-arm to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-linux-arm.zip
asset_name : ASF-linux-arm.zip
asset_content_type : application/zip
- name : Upload ASF-linux-arm64 to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-linux-arm64.zip
asset_name : ASF-linux-arm64.zip
asset_content_type : application/zip
- name : Upload ASF-linux-x64 to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-linux-x64.zip
asset_name : ASF-linux-x64.zip
asset_content_type : application/zip
2021-11-10 19:36:09 +00:00
- name : Upload ASF-osx-arm64 to GitHub release
uses : actions/upload-release-asset@v1.0.2
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-osx-arm64.zip
asset_name : ASF-osx-arm64.zip
asset_content_type : application/zip
2021-05-20 21:36:02 +00:00
- name : Upload ASF-osx-x64 to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-osx-x64.zip
asset_name : ASF-osx-x64.zip
asset_content_type : application/zip
- name : Upload ASF-win-x64 to GitHub release
2021-06-30 14:19:41 +00:00
uses : actions/upload-release-asset@v1.0.2
2021-05-20 21:36:02 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/ASF-win-x64.zip
asset_name : ASF-win-x64.zip
asset_content_type : application/zip
2021-08-01 22:45:58 +00:00
- name : Upload SHA512SUMS to GitHub release
uses : actions/upload-release-asset@v1.0.2
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/SHA512SUMS
asset_name : SHA512SUMS
asset_content_type : text/plain
- name : Upload SHA512SUMS.sign to GitHub release
uses : actions/upload-release-asset@v1.0.2
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.github_release.outputs.upload_url }}
asset_path : out/SHA512SUMS.sign
asset_name : SHA512SUMS.sign
asset_content_type : text/plain