Skip to content

Commit

Permalink
Migrated to .Net 8.0 and added JSON support
Browse files Browse the repository at this point in the history
Signed-off-by: Zafer Balkan <[email protected]>
  • Loading branch information
zbalkan committed Jan 30, 2024
1 parent 3521367 commit 154460f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish

on: push

jobs:
release:
name: Release
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Build
shell: bash
run: |
release_name="release-dumpntds-${{ matrix.target }}"
# Build everything
dotnet publish ./source/dumpntds.sln --framework net8.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name"
# Remove unnecessary files
rm -f "./${release_name}/*.config" 2> /dev/null
rm -f "./${release_name}/*.pdb" 2> /dev/null
# Pack executable files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*.exe"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "release*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions source/dumpntds/dumpntds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.Database.ManagedEsent" Version="2.0.4" />
</ItemGroup>
<PropertyGroup>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>

0 comments on commit 154460f

Please sign in to comment.