diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 42fbfa0..0db3b11 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -38,10 +38,11 @@ jobs: - name: Prepare artifacts run: | echo "Current working directory: $PWD" - Get-ChildItem -Path .\artifacts\ -Recurse | Remove-Item -force -recurse - Remove-Item .\artifacts\ -Force - $version = (Select-String -Path "build.gradle" -Pattern "version" | Where-Object { $_ -notmatch "id" -and $_ -notmatch ":" } | ForEach-Object { [regex]::Match($_, "'(.*?)'").Groups[1].Value }) - Write-Output $version + Get-ChildItem -Path artifacts -Recurse | Remove-Item -force -recurse + if (Test-Path -Path .\artifacts) { Remove-Item -Path .\artifacts -Recurse -Force } + $version = (Select-String -Path "build.gradle" -Pattern "^\s*version\s*'([^']+)'" | ForEach-Object { $_.Matches[0].Groups[1].Value }) + echo Version: $version + New-Item -Path "artifacts" -ItemType Directory Copy-Item -Path "./src/build/ActionsTesting.exe" -Destination "./artifacts/ActionsTesting-$version.exe" -Verbose ISCC.exe /? - name: Upload artifacts diff --git a/.gitignore b/.gitignore index 743e213..8bcbec9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -src/build/ \ No newline at end of file +src/build/ +artifacts/ \ No newline at end of file