Skip to content

Commit

Permalink
add linux build, update ci and add renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
Apfelwurm committed Nov 8, 2022
1 parent f08a4df commit 5a69a93
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 13 deletions.
59 changes: 51 additions & 8 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ on:
- '!**'

env:
DOTNET6_VERSION: '6.0.100' # The .NET SDK version to use
DOTNET5_VERSION: '5.0.403' # The .NET SDK version to use
DOTNET6_VERSION: '6.0' # The .NET SDK version to use
DOTNET5_VERSION: '5.0' # still used for electron

jobs:

build_windows_client_x64:
runs-on: windows-2019
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# still used for electron
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET5_VERSION }}
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET6_VERSION }}
- name: Install dependencies
Expand All @@ -47,21 +47,62 @@ jobs:
shell: pwsh
working-directory: ${{ github.workspace }}\bin\Desktop
- name: upload artifact windows client x64 msi
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: EventulaEntranceClient
path: ./bin/Desktop/EventulaEntranceClient_Setup.exe
retention-days: 1


build_linux_client_x64:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
# still used for electron
- name: Setup .NET 5
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET5_VERSION }}
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET6_VERSION }}
- name: Install dependencies
run: dotnet tool install ElectronNET.CLI -g
- name: get Version
if: ${{ (startsWith(github.ref, 'refs/tags/v')) }}
run: echo "EVENTULAENTRANCECLIENTVER=$(echo ${GITHUB_REF} | sed 's|refs/heads/||g' | sed 's|refs/tags/v||g' | sed 's|-beta||g' )" >> $GITHUB_ENV
shell: bash
- name: get Version
if: ${{ !(startsWith(github.ref, 'refs/tags/v')) }}
run: echo "EVENTULAENTRANCECLIENTVER=1.0.0" >> $GITHUB_ENV
shell: bash
- name: set client version
run: 'sed -i "s|\"buildVersion\": \".*\"|\"buildVersion\": \"$EVENTULAENTRANCECLIENTVER\"|g" electron.manifest.json'
shell: bash
- name: Build
run: electronize build /target linux
- name: rename
run: mv EventulaEntranceClient*.AppImage EventulaEntranceClient.AppImage
working-directory: ${{ github.workspace }}/bin/Desktop
- name: upload artifact linux client x64 appimage
uses: actions/upload-artifact@v3
with:
name: EventulaEntranceClientLinux
path: ./bin/Desktop/EventulaEntranceClient.AppImage
retention-days: 1

release:
name: Release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs:
- build_windows_client_x64
- build_linux_client_x64
runs-on: ubuntu-latest
steps:
- name: get artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Release
Expand All @@ -70,6 +111,7 @@ jobs:
with:
files: |
./EventulaEntranceClient/EventulaEntranceClient_Setup.exe
./EventulaEntranceClientLinux/EventulaEntranceClient.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: pre Release
Expand All @@ -79,5 +121,6 @@ jobs:
prerelease: true
files: |
./EventulaEntranceClient/EventulaEntranceClient_Setup.exe
./EventulaEntranceClientLinux/EventulaEntranceClient.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net6.0/eventula_entrance_client.dll",
"program": "${workspaceFolder}/bin/Debug/net6.0/EventulaEntranceClient.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/eventula_entrance_client.csproj",
"${workspaceFolder}/EventulaEntranceClient.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/eventula_entrance_client.csproj",
"${workspaceFolder}/EventulaEntranceClient.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,7 +32,7 @@
"args": [
"watch",
"run",
"${workspaceFolder}/eventula_entrance_client.csproj",
"${workspaceFolder}/EventulaEntranceClient.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
5 changes: 4 additions & 1 deletion EventulaEntranceClient.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RollForward>Major</RollForward>
</PropertyGroup>
Expand All @@ -16,4 +16,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}

0 comments on commit 5a69a93

Please sign in to comment.