diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml new file mode 100644 index 00000000..6ae3c87a --- /dev/null +++ b/.github/workflows/dotnet-build.yml @@ -0,0 +1,44 @@ +# 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: + +env: + 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: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '7.x' + 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\Properties\${{ 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: Publish artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{ matrix.release_name }} + path: ./Source/bin/Publish/${{ matrix.os }}-${{ matrix.release_name }}/* + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml new file mode 100644 index 00000000..c747b782 --- /dev/null +++ b/.github/workflows/dotnet-release.yml @@ -0,0 +1,66 @@ +# 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: release + +on: + push: + tags: + - 'v*' + +env: + DOTNET_VERSION: '7' # The .NET SDK version to use + DOTNET_SOURCE: './Source' + DOTNET_CONFIGURATION: 'Release' + +jobs: + build: + uses: ./.github/workflows/dotnet-build.yml + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Calculate version + id: version + run: | + export TAG=${{ github.ref_name }} + echo "version=${TAG#v}" >> $GITHUB_OUTPUT + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Rename artifacts + id: rename + working-directory: ./artifacts + run: | + for FILENAME in *; do mv ${FILENAME} Libation.${{ steps.version.outputs.version }}-${FILENAME,,}; done + mv Libation.${{ steps.version.outputs.version }}-windows-classic Classic-Libation.${{ steps.version.outputs.version }}-windows-classic + + - name: Zip assets + working-directory: ./artifacts + run: | + for FILENAME in *; do zip -r ${FILENAME}.zip ${FILENAME}; done + mkdir ./assets + mv *.zip ./assets + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Libation ${{ steps.version.outputs.version }} + body: + draft: true + prerelease: false + + - name: Upload release assets + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} + assets_path: ./artifacts/assets diff --git a/.github/workflows/dotnet-validate.yml b/.github/workflows/dotnet-validate.yml new file mode 100644 index 00000000..16313d20 --- /dev/null +++ b/.github/workflows/dotnet-validate.yml @@ -0,0 +1,19 @@ +# 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: validate + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + DOTNET_VERSION: '7' # The .NET SDK version to use + DOTNET_SLN: './Source/Libation.sln' + DOTNET_CONFIGURATION: 'Release' + +jobs: + build: + uses: ./.github/workflows/dotnet-build.yml diff --git a/.releaseindex.json b/.releaseindex.json index d3a35438..37a967f8 100644 --- a/.releaseindex.json +++ b/.releaseindex.json @@ -1,6 +1,6 @@ { - "WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-win-classic\\.zip", - "WindowsAvalonia":"Libation\\.\\d+\\.\\d+\\.\\d+-win-chardonnay\\.zip", + "WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-windows-classic\\.zip", + "WindowsAvalonia":"Libation\\.\\d+\\.\\d+\\.\\d+-windows-chardonnay\\.zip", "LinuxAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-chardonnay", "MacOSAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-macos-chardonnay" } diff --git a/Source/HangoverAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml b/Source/HangoverAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml index 9b2a3ee4..0b59245a 100644 --- a/Source/HangoverAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml +++ b/Source/HangoverAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\linux-chardonnay + ..\bin\Publish\Linux-chardonnay FileSystem - net6.0 + net7.0 linux-x64 true false diff --git a/Source/HangoverAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml b/Source/HangoverAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml index 375935b6..edc665dd 100644 --- a/Source/HangoverAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml +++ b/Source/HangoverAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\macos-chardonnay + ..\bin\Publish\MacOS-chardonnay FileSystem - net6.0 + net7.0 osx-x64 true false diff --git a/Source/HangoverAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/HangoverAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml index bdce48eb..0a5269ea 100644 --- a/Source/HangoverAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/HangoverAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\win-chardonnay + ..\bin\Publish\Windows-chardonnay FileSystem - net6.0 + net7.0 win-x64 true false diff --git a/Source/HangoverWinForms/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/HangoverWinForms/Properties/PublishProfiles/WindowsProfile.pubxml index 708a4cb7..7d5103f3 100644 --- a/Source/HangoverWinForms/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/HangoverWinForms/Properties/PublishProfiles/WindowsProfile.pubxml @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Any CPU ..\bin\Publish\classic FileSystem - net6.0-windows + net7.0-windows win-x64 true false diff --git a/Source/LibationAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml b/Source/LibationAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml index 9b2a3ee4..0b59245a 100644 --- a/Source/LibationAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml +++ b/Source/LibationAvalonia/Properties/PublishProfiles/LinuxProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\linux-chardonnay + ..\bin\Publish\Linux-chardonnay FileSystem - net6.0 + net7.0 linux-x64 true false diff --git a/Source/LibationAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml b/Source/LibationAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml index 375935b6..edc665dd 100644 --- a/Source/LibationAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml +++ b/Source/LibationAvalonia/Properties/PublishProfiles/MacOSProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\macos-chardonnay + ..\bin\Publish\MacOS-chardonnay FileSystem - net6.0 + net7.0 osx-x64 true false diff --git a/Source/LibationAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/LibationAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml index bdce48eb..0a5269ea 100644 --- a/Source/LibationAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/LibationAvalonia/Properties/PublishProfiles/WindowsProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\win-chardonnay + ..\bin\Publish\Windows-chardonnay FileSystem - net6.0 + net7.0 win-x64 true false diff --git a/Source/LibationCli/Properties/PublishProfiles/LinuxProfile.pubxml b/Source/LibationCli/Properties/PublishProfiles/LinuxProfile.pubxml index 9b2a3ee4..0b59245a 100644 --- a/Source/LibationCli/Properties/PublishProfiles/LinuxProfile.pubxml +++ b/Source/LibationCli/Properties/PublishProfiles/LinuxProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\linux-chardonnay + ..\bin\Publish\Linux-chardonnay FileSystem - net6.0 + net7.0 linux-x64 true false diff --git a/Source/LibationCli/Properties/PublishProfiles/MacOSProfile.pubxml b/Source/LibationCli/Properties/PublishProfiles/MacOSProfile.pubxml index 375935b6..edc665dd 100644 --- a/Source/LibationCli/Properties/PublishProfiles/MacOSProfile.pubxml +++ b/Source/LibationCli/Properties/PublishProfiles/MacOSProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\macos-chardonnay + ..\bin\Publish\MacOS-chardonnay FileSystem - net6.0 + net7.0 osx-x64 true false diff --git a/Source/LibationCli/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/LibationCli/Properties/PublishProfiles/WindowsProfile.pubxml index bdce48eb..0a5269ea 100644 --- a/Source/LibationCli/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/LibationCli/Properties/PublishProfiles/WindowsProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\bin\Publish\win-chardonnay + ..\bin\Publish\Windows-chardonnay FileSystem - net6.0 + net7.0 win-x64 true false diff --git a/Source/LibationWinForms/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/LibationWinForms/Properties/PublishProfiles/WindowsProfile.pubxml index e3a5e4e2..5e3f4318 100644 --- a/Source/LibationWinForms/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/LibationWinForms/Properties/PublishProfiles/WindowsProfile.pubxml @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Any CPU ..\bin\Publish\classic FileSystem - net6.0-windows + net7.0-windows win-x64 true false diff --git a/Source/LoadByOS/LinuxConfigApp/Properties/PublishProfiles/LinuxProfile.pubxml b/Source/LoadByOS/LinuxConfigApp/Properties/PublishProfiles/LinuxProfile.pubxml index 87456e98..f3a25bb3 100644 --- a/Source/LoadByOS/LinuxConfigApp/Properties/PublishProfiles/LinuxProfile.pubxml +++ b/Source/LoadByOS/LinuxConfigApp/Properties/PublishProfiles/LinuxProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\..\bin\Publish\linux-chardonnay + ..\..\bin\Publish\Linux-chardonnay FileSystem - net6.0 + net7.0 linux-x64 true false diff --git a/Source/LoadByOS/MacOSConfigApp/Properties/PublishProfiles/MacOSProfile.pubxml b/Source/LoadByOS/MacOSConfigApp/Properties/PublishProfiles/MacOSProfile.pubxml index 7d7e53ee..ea9e44d8 100644 --- a/Source/LoadByOS/MacOSConfigApp/Properties/PublishProfiles/MacOSProfile.pubxml +++ b/Source/LoadByOS/MacOSConfigApp/Properties/PublishProfiles/MacOSProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - ..\..\bin\Publish\macos-chardonnay + ..\..\bin\Publish\MacOS-chardonnay FileSystem - net6.0 + net7.0 osx-x64 true false diff --git a/Source/LoadByOS/WindowsConfigApp/Properties/PublishProfiles/WindowsProfile.pubxml b/Source/LoadByOS/WindowsConfigApp/Properties/PublishProfiles/WindowsProfile.pubxml index 46581a34..03ef4015 100644 --- a/Source/LoadByOS/WindowsConfigApp/Properties/PublishProfiles/WindowsProfile.pubxml +++ b/Source/LoadByOS/WindowsConfigApp/Properties/PublishProfiles/WindowsProfile.pubxml @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Any CPU ..\..\bin\Publish\classic FileSystem - net6.0-windows + net7.0-windows win-x64 true false