Proper build
Builds all packages properly
This commit is contained in:
parent
8a82c294a1
commit
78fd09aa91
58
.github/workflows/dotnet-build.yml
vendored
Normal file
58
.github/workflows/dotnet-build.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
# This workflow will build a .NET project
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
||||
|
||||
name: build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
description: 'Libation version'
|
||||
required: true
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '7' # The .NET SDK version to use
|
||||
DOTNET_CONFIGURATION: 'Release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [Linux, MacOS, Windows]
|
||||
ui: [Avalonia]
|
||||
release_name: [chardonnay]
|
||||
include:
|
||||
- os: Windows
|
||||
ui: WinForms
|
||||
release_name: classic
|
||||
steps:
|
||||
- name: Lowercase os
|
||||
run: |
|
||||
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
env:
|
||||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build
|
||||
working-directory: ./Source
|
||||
run: |
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} Libation${{ matrix.ui }}\Libation${{ matrix.ui }}.csproj -p:PublishProfile=Libation${{ matrix.ui }}\Properties\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} LoadByOS\${{ matrix.os }}ConfigApp\${{ matrix.os }}ConfigApp.csproj -p:PublishProfile=LoadByOS\${{ matrix.os }}ConfigApp\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} LibationCli\LibationCli.csproj -p:PublishProfile=LibationCli\Properties\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} Hangover${{ matrix.ui }}\Hangover${{ matrix.ui }}.csproj -p:PublishProfile=Hangover${{ matrix.ui }}\Properties\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
- name: Rename release folder
|
||||
working-directory: ./Source
|
||||
run: ren ./bin/Publish/${{ matrix.os }}-${{ matrix.release_name }} Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}
|
||||
- name: Zip artifact
|
||||
run: Compress-Archive ./Source/bin/Publish/Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }} Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}.zip
|
||||
- name: Publish artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}
|
||||
path: Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}.zip
|
||||
if-no-files-found: error
|
||||
47
.github/workflows/dotnet-publish.yml
vendored
47
.github/workflows/dotnet-publish.yml
vendored
@ -9,31 +9,15 @@ on:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
|
||||
DOTNET_SLN: './Source/Libation.sln'
|
||||
DOTNET_VERSION: '7' # The .NET SDK version to use
|
||||
DOTNET_SOURCE: './Source'
|
||||
DOTNET_CONFIGURATION: 'Release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
env:
|
||||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ env.DOTNET_SLN }}
|
||||
- name: Build
|
||||
run: dotnet build --configuration ${{ env.DOTNET_CONFIGURATION }} --no-restore ${{ env.DOTNET_SLN }}
|
||||
- name: Publish Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: LibationZip
|
||||
path: ./Source/bin/${{ env.DOTNET_CONFIGURATION }}/
|
||||
if-no-files-found: error
|
||||
uses: ./.github/workflows/dotnet-build.yml
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
@ -42,11 +26,7 @@ jobs:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: LibationZip
|
||||
path: ./Libation-${{ github.ref_name }}
|
||||
- name: Zip Artifact
|
||||
run: zip -r Libation.${{ github.ref_name }}.zip ./Libation-${{ github.ref_name }}
|
||||
|
||||
path: artifacts
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
@ -56,16 +36,13 @@ jobs:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Libation ${{ github.ref }}
|
||||
body: <Put a body here>
|
||||
draft: false
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
- name: Upload Release Assets
|
||||
id: upload-release-assets
|
||||
uses: dwenegar/upload-release-assets@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: Libation.${{ github.ref_name }}.zip
|
||||
asset_name: Libation.${{ github.ref_name }}.zip
|
||||
asset_content_type: application/zip
|
||||
release_id: ${{ steps.create_release.outputs.id }}
|
||||
assets_path: ./artifacts
|
||||
24
.github/workflows/dotnet-validate.yml
vendored
24
.github/workflows/dotnet-validate.yml
vendored
@ -10,28 +10,12 @@ on:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
|
||||
DOTNET_VERSION: '7' # The .NET SDK version to use
|
||||
DOTNET_SLN: './Source/Libation.sln'
|
||||
DOTNET_CONFIGURATION: 'Release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ env.DOTNET_SLN }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration ${{ env.DOTNET_CONFIGURATION }} --no-restore ${{ env.DOTNET_SLN }}
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --configuration ${{ env.DOTNET_CONFIGURATION }} --no-build --verbosity normal ${{ env.DOTNET_SLN }}
|
||||
|
||||
uses: ./.github/workflows/dotnet-build.yml
|
||||
with:
|
||||
version: ${{ github.sha }}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-win-classic\\.zip",
|
||||
"WindowsAvalonia":"Libation\\.\\d+\\.\\d+\\.\\d+-win-chardonnay\\.zip",
|
||||
"LinuxAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-chardonnay",
|
||||
"MacOSAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-macos-chardonnay"
|
||||
"WindowsClassic": "Libation\\.v\\d+\\.\\d+\\.\\d+-Windows-chardonnay\\.zip",
|
||||
"WindowsAvalonia":"Libation\\.v\\d+\\.\\d+\\.\\d+-Windows-chardonnay\\.zip",
|
||||
"LinuxAvalonia": "Libation\\.v\\d+\\.\\d+\\.\\d+-Linux-chardonnay",
|
||||
"MacOSAvalonia": "Libation\\.v\\d+\\.\\d+\\.\\d+-MacOS-chardonnay"
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\linux-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Linux-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\macos-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\MacOS-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\win-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Windows-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\linux-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Linux-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\macos-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\MacOS-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\win-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Windows-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\linux-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Linux-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\macos-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\MacOS-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\bin\Publish\win-chardonnay</PublishDir>
|
||||
<PublishDir>..\bin\Publish\Windows-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\..\bin\Publish\linux-chardonnay</PublishDir>
|
||||
<PublishDir>..\..\bin\Publish\Linux-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
|
||||
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>..\..\bin\Publish\macos-chardonnay</PublishDir>
|
||||
<PublishDir>..\..\bin\Publish\MacOS-chardonnay</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user