Skip to content

Commit aa3ebca

Browse files
committed
Merge branch 'actions'
2 parents 7b6313e + 814ffa9 commit aa3ebca

2 files changed

Lines changed: 32 additions & 5 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: .NET Release
2+
3+
on: push
4+
5+
jobs:
6+
release:
7+
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
with:
11+
submodules: recursive
12+
- name: Setup .NET
13+
uses: actions/setup-dotnet@v3
14+
with:
15+
dotnet-version: 6.0.x
16+
- name: Restore dependencies
17+
run: dotnet restore
18+
- name: Build (Windows)
19+
run: dotnet publish "ImageMap4" --runtime win-x64 -p:PublishSingleFile=true /p:DebugType=None /p:DebugSymbols=false --configuration Release --self-contained false
20+
- name: Build (Linux)
21+
run: dotnet publish "ImageMap4.CMD" --runtime linux-x64 -p:PublishSingleFile=true /p:DebugType=None /p:DebugSymbols=false --configuration Release --self-contained false
22+
- name: Zip (Windows)
23+
run: powershell Compress-Archive -Path "ImageMap4/bin/Release/net6.0-windows/win-x64/publish/ImageMap.exe", "ImageMap4/bin/Release/net6.0-windows/win-x64/publish/ImageMap-cmd.exe", "ImageMap4/bin/Release/net6.0-windows/win-x64/publish/leveldb_mcpe_win_amd64.dll", "ImageMap4/bin/Release/net6.0-windows/win-x64/publish/leveldb_mcpe_win32.dll" -DestinationPath "ImageMap4-Windows.zip"
24+
- name: Zip (Linux)
25+
run: powershell Compress-Archive -Path "ImageMap4.CMD/bin/Release/net6.0/linux-x64/publish/ImageMap-cmd", "ImageMap4.CMD/bin/Release/net6.0/linux-x64/publish/leveldb_mcpe_linux_x86_64.so" -DestinationPath "ImageMap4-Linux.zip"
26+
- name: Create Release
27+
uses: softprops/action-gh-release@v1
28+
if: startsWith(github.ref, 'refs/tags/')
29+
with:
30+
files: |
31+
./ImageMap4-Windows.zip
32+
./ImageMap4-Linux.zip

ImageMap4/ImageMap4.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,4 @@
115115
<SubType>Designer</SubType>
116116
</Page>
117117
</ItemGroup>
118-
119-
<Target Name="PostPublish" AfterTargets="Publish">
120-
<Exec Command="dotnet publish -o &quot;$(ProjectDir)bin\Publish&quot; &quot;$(SolutionDir)ImageMap4.CMD" />
121-
<Exec Command="powershell Compress-Archive -Path '$(ProjectDir)bin\Publish\*.dll', '$(ProjectDir)bin\Publish\*.exe' -DestinationPath '$(ProjectDir)bin\Publish\ImageMap4.zip' -Force" />
122-
</Target>
123118
</Project>

0 commit comments

Comments
 (0)