Skip to content

Commit

Permalink
Merge pull request #19 from BUTR/dev
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
Aragas authored Mar 22, 2023
2 parents d7f25e3 + ca1a504 commit 82b7571
Show file tree
Hide file tree
Showing 36 changed files with 833 additions and 316 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
wget \
ca-certificates \
\
# .NET dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu66 \
libssl1.1 \
libstdc++6 \
zlib1g \
\
# Mono
mono-devel \
# Install Microsoft package feed
&& wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
\
# Install .NET 6 & 7
&& apt-get update \
&& apt-get install -y --no-install-recommends \
dotnet-sdk-6.0 \
dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": ".NET Core & Mono",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
}
}
}
139 changes: 109 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ name: Publish

on:
push:
branches:
- master
paths:
- '.github/workflows/publish.yml'
- 'src/Bannerlord.LauncherEx/**.*'
- 'src/Bannerlord.BLSE/**.*'
- 'src/Bannerlord.BLSE.Shared/**.*'
- 'src/Bannerlord.BLSE.Standalone/**.*'
- 'src/Bannerlord.BLSE.Launcher/**.*'
- 'src/Bannerlord.BLSE.LauncherEx/**.*'
- 'src/Bannerlord.BLSE.NativeAOT.Standalone/**.*'
- 'src/Bannerlord.BLSE.NativeAOT.Launcher/**.*'
- 'src/Bannerlord.BLSE.NativeAOT.LauncherEx/**.*'
workflow_dispatch:

env:
Expand All @@ -23,37 +21,117 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build:
name: Publish
runs-on: windows-latest
get-changelog:
name: Get Changelog
runs-on: ubuntu-latest
outputs:
mod_version: ${{ steps.changelog.outputs.mod_version }}
mod_description: ${{ steps.changelog.outputs.mod_description }}
steps:
- uses: actions/checkout@v3

- name: Install and Run ChangelogParser
id: changelog
run: |
dotnet tool install -g Bannerlord.ChangelogParser
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "mod_version=$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")" >> $GITHUB_OUTPUT
echo "mod_description<<$EOF" >> $GITHUB_OUTPUT
echo "$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
shell: bash

build-loaders-standalone:
name: Build Loaders Standalone
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Build Bannerlord.BLSE.NativeAOT.Standalone
run: |
mkdir bannerlord;
dotnet build src/Bannerlord.BLSE.NativeAOT.Standalone/Bannerlord.BLSE.NativeAOT.Standalone.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
with:
name: bannerlord
path: ./bannerlord/


build-loaders-launcher:
name: Build Loaders Launcher
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Build Bannerlord.BLSE.NativeAOT.Launcher
run: |
mkdir bannerlord;
dotnet build src/Bannerlord.BLSE.NativeAOT.Launcher/Bannerlord.BLSE.NativeAOT.Launcher.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
with:
name: bannerlord
path: ./bannerlord/


build-loaders-launcherex:
name: Build Loaders LauncehrEx
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Build Bannerlord.BLSE.NativeAOT.LauncherEx
run: |
mkdir bannerlord;
dotnet build src/Bannerlord.BLSE.NativeAOT.LauncherEx/Bannerlord.BLSE.NativeAOT.LauncherEx.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
with:
name: bannerlord
path: ./bannerlord/

build-shared:
name: Build Shared
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Build Bannerlord.BLSE
run: >-
run: |
mkdir bannerlord;
dotnet build src/Bannerlord.BLSE.Shared/Bannerlord.BLSE.Shared.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
dotnet build src/Bannerlord.BLSE.Standalone/Bannerlord.BLSE.Standalone.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
dotnet build src/Bannerlord.BLSE.Launcher/Bannerlord.BLSE.Launcher.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
dotnet build src/Bannerlord.BLSE.LauncherEx/Bannerlord.BLSE.LauncherEx.csproj --configuration Release -p:GameFolder="$PWD/bannerlord" /nowarn:MSB4011;
shell: pwsh

- name: Install and Run ChangelogParser
id: changelog
run: |
dotnet tool install -g Bannerlord.ChangelogParser
vers="$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")"
echo "::set-output name=mod_version::$vers"
desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")"
desc="${desc//'%'/'%25'}"
desc="${desc//$'\n'/'%0A'}"
desc="${desc//$'\r'/'%0D'}"
echo "::set-output name=mod_description::$desc"
shell: sh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
with:
Expand All @@ -64,14 +142,14 @@ jobs:
# NEXUSMODS #
###########################
publish-on-nexusmods:
if: false
needs: ["build"]
if: false && github.ref == 'refs/heads/master'
needs: ["get-changelog", "build-loaders-standalone", "build-loaders-launcher", "build-loaders-launcherex", "build-shared"]
uses: BUTR/workflows/.github/workflows/release-nexusmods.yml@master
with:
nexusmods_game_id: mountandblade2bannerlord
nexusmods_mod_id: 1
mod_filename: BLSE
mod_version: ${{ needs.build.outputs.mod_version }}
mod_version: ${{ needs.build-changelog.outputs.mod_version }}
mod_description: ${{ needs.build.outputs.mod_description }}
artifact_name: bannerlord
secrets:
Expand All @@ -82,10 +160,11 @@ jobs:
# GITHUB #
###########################
publish-on-github:
needs: ["build"]
if: github.ref == 'refs/heads/master'
needs: ["get-changelog", "build-loaders-standalone", "build-loaders-launcher", "build-loaders-launcherex", "build-shared"]
uses: BUTR/workflows/.github/workflows/release-github.yml@master
with:
mod_id: Bannerlord.BLSE
mod_version: ${{ needs.build.outputs.mod_version }}
mod_version: ${{ needs.build-changelog.outputs.mod_version }}
mod_description: ${{ needs.build.outputs.mod_description }}
artifact_name: bannerlord
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!--Development Variables-->
<PropertyGroup>
<Version>1.0.4</Version>
<Version>1.1.0</Version>
<HarmonyVersion>2.10.1</HarmonyVersion>
<BUTRSharedVersion>3.0.0.135</BUTRSharedVersion>
<BUTRModuleManagerVersion>5.0.198</BUTRModuleManagerVersion>
Expand Down
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1
* The launchers are now native code instead of C#, but for the cost of increased size
* Fixed Singleplayer not being shown by default
* Better error messages
---------------------------------------------------------------------------------------------------
Version: 1.0.4
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1
* Show a message if the save game failed to load via the Continue feature
Expand Down
38 changes: 0 additions & 38 deletions src/Bannerlord.BLSE.Launcher/Bannerlord.BLSE.Launcher.csproj

This file was deleted.

1 change: 0 additions & 1 deletion src/Bannerlord.BLSE.Launcher/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions src/Bannerlord.BLSE.LauncherEx/Bannerlord.BLSE.LauncherEx.csproj

This file was deleted.

9 changes: 0 additions & 9 deletions src/Bannerlord.BLSE.LauncherEx/Properties/launchSettings.json

This file was deleted.

1 change: 0 additions & 1 deletion src/Bannerlord.BLSE.LauncherEx/README.md

This file was deleted.

Loading

0 comments on commit 82b7571

Please sign in to comment.