Skip to content

Commit

Permalink
add pdb in package
Browse files Browse the repository at this point in the history
  • Loading branch information
ate47 committed Nov 16, 2024
1 parent c6223e2 commit f106309
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ jobs:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: "latest_build"
artifacts: "build/package/acts.zip"
artifacts: "build/package/acts.zip,build/package/acts-dev.zip"
artifactErrorsFailBuild: true
makeLatest: false
removeArtifacts: true
replacesArtifacts: true
allowUpdates: true
name: "Dev build ${{ steps.get_version.outputs.version }}"
body: "Latest dev build, [get the latest release build here](https://github.com/ate47/atian-cod-tools/releases/latest)."
body: "Latest dev build, [get the latest release build here](https://github.com/${{ github.repository }}/releases/latest)."
- name: Upload release
if: inputs.release && matrix.cfg == 'Release' && github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "build/package/acts.zip"
artifacts: "build/package/acts.zip,build/package/acts-dev.zip"
artifactErrorsFailBuild: true
makeLatest: true
tag: "${{ steps.get_version.outputs.version }}"
Expand Down
24 changes: 23 additions & 1 deletion scripts/package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,30 @@ try {

# Compress
Compress-Archive -LiteralPath "$base" -DestinationPath "$base.zip" > $null

Write-Host "Packaged to '$base.zip'"

Write-Host "Building dev package..."
foreach ($fileItem in (Get-ChildItem $base/bin)) {
$fileName = $fileItem.Name
$split = $fileName.LastIndexOf(".exe")

if ($split -ne -1) {
$pdbFile = "build/bin/$($fileName.SubString(0, $split)).pdb"
}
else {
$split = $fileName.LastIndexOf(".dll")

if ($split -ne -1) {
$pdbFile = "build/bin/$($fileName.SubString(0, $split)).pdb"
} else {
continue
}
}
Copy-Item $pdbFile "$base/bin" -ErrorAction Ignore
}
Compress-Archive -LiteralPath "$base" -DestinationPath "$base-dev.zip" > $null
Write-Host "Packaged to '$base-dev.zip'"

}
finally {
$prevPwd | Set-Location
Expand Down

0 comments on commit f106309

Please sign in to comment.