Skip to content

Commit

Permalink
feat(ci): dotnet 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ToaHartor committed Jul 11, 2024
1 parent 389ada4 commit fb2d18f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autobuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.102
dotnet-version: 8.0.201

- name: Build
shell: bash
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Developer release

on:
push:
branches:
- develop

jobs:
dev-build:
name: Develop build
# All architectures supported
strategy:
matrix:
arch: ['win-x64', 'win-arm64', 'linux-x64', 'linux-arm64', 'osx-x64', 'osx.11.0-arm64', 'osx.12-arm64']

runs-on: ubuntu-latest

steps:
- name: Checkout project
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.201
cache: true

- name: Install dependencies
run: dotnet restore

- name: Build
shell: bash
# run: bash build-all.sh
run: |
version=$(cat src/GICutscenes.csproj | grep -oP "<Version>\K([0-9]\.[0-9]\.[0-9])")
release_name="GICutscenes-$version-${GITHUB_SHA::6}-${{ matrix.arch }}"
release_name_standalone="$release_name-standalone"
# Self contained
dotnet publish -c Release -r "${{ matrix.arch }}" -o "$release_name_standalone" --self-contained
# Framework dependant
dotnet publish -c Release -r "${{ matrix.arch }}" -o "$release_name" --self-contained false -p:PublishTrimmed=false
if [ "${{ matrix.arch }}" == "win-x64" ]; then
# Pack for standalone version
7z a -tzip "${release_name_standalone}.zip" "./${release_name_standalone}/*"
# Pack for Framework dependant version
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name_standalone}.tar.gz" "$release_name_standalone"
tar czvf "${release_name}.tar.gz" "$release_name"
fi
rm -r "$release_name_standalone"
rm -r "$release_name"
12 changes: 7 additions & 5 deletions src/GICutscenes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Version>0.5.0</Version>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<!--<RuntimeIdentifier>win-x64</RuntimeIdentifier>-->
<PublishTrimmed>true</PublishTrimmed>
<Authors>ToaHartor</Authors>
Expand All @@ -26,21 +26,23 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Optimize>False</Optimize>
<DebugType>full</DebugType>
<WarningLevel>9999</WarningLevel>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>full</DebugType>
<PublishSingleFile>true</PublishSingleFile>
<TieredCompilation>true</TieredCompilation>
<PublishReadyToRun>true</PublishReadyToRun>
<WarningLevel>9999</WarningLevel>
<!--<RunAOTCompilation>true</RunAOTCompilation>-->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0-preview.1.24080.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-preview.1.24080.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-preview.1.24080.9" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit fb2d18f

Please sign in to comment.