Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-map-adapter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build War3App.MapAdapter

on:
pull_request:
branches: ['master']
workflow_dispatch:

env:
DOTNET_VERSION: '8.0.x'
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build-only:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Build solution
run: dotnet build War3App.MapAdapter.WinForms.slnf -c Release
46 changes: 46 additions & 0 deletions .github/workflows/publish-map-adapter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish War3App.MapAdapter

on:
workflow_dispatch:

env:
DOTNET_VERSION: '8.0.x'
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Publish project
run: dotnet publish src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj -c Release -o ./artifacts/map-adapter

- name: Create zip
run: cd ./artifacts/map-adapter && zip -r ../MapAdapter.zip .

- name: Get version from csproj
run: |
VERSION=$(grep '<Version>' src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj | cut -d'>' -f2 | cut -d'<' -f1)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Create GitHub Release
uses: softprops/action-gh-release@v2.3.2
with:
name: War3App.MapAdapter v${{ env.VERSION }}
tag_name: mapadapter-v${{ env.VERSION }}
files: |
./artifacts/MapAdapter.zip
draft: ${{ github.ref_name != 'master' }}
1 change: 1 addition & 0 deletions src/War3App.Common.WinForms/War3App.Common.WinForms.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<TargetFramework>net6.0-windows</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>WinExe</OutputType>
<Version>1.5.0</Version>
<Version>1.5.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>WinExe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading