From de0f0b8b20a1dfa7740279ce05112f913fc4c024 Mon Sep 17 00:00:00 2001 From: Izakbar Date: Sat, 8 Feb 2025 17:43:18 +0000 Subject: [PATCH] github release yaml --- .github/workflows/release.yml | 49 ++++++++++++++++++++++++++ .github/workflows/windows-build.yml_ | 52 ++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/windows-build.yml_ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3e147ed --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Eve-O Preview Release + +on: + release: + types: [published] + +jobs: + release: + name: Release + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + - { name: Linux, os: windows-2022 } + - { name: Windows, os: windows-2022 } + dotnet: + - { name: .NET 8, version: '8.0.x' } + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Restore + run: dotnet restore src\\Eve-O-Preview\\Eve-O-Preview.csproj + - name: Build + run: | + echo "${{matrix.platform.name}} ${{ github.event.release.tag_name }}" + dotnet build src\\Eve-O-Preview\\Eve-O-Preview.csproj --configuration Release --no-restore -p:EVEOTARGET="${{matrix.platform.name}}" -p:AssemblyVersion="${{ github.event.release.tag_name }}" + - name: BuildPackage + run: | + git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' + # Build everything + dotnet publish src\\Eve-O-Preview\\Eve-O-Preview.csproj -c Release -o "Eve-O-Preview-${{ github.event.release.tag_name }}-${{ matrix.platform.name }}" -p:EVEOTARGET="${{matrix.platform.name}}" -p:AssemblyVersion="${{ github.event.release.tag_name }}" + - name: Create archive + run: | + Compress-Archive -Path "Eve-O-Preview-${{ github.event.release.tag_name }}-${{ matrix.platform.name }}\\*" -Destination "Release-${{ github.event.release.tag_name }}-${{ matrix.platform.name }}.zip" + - name: Upload Asset + id: upload-release-client-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: "Release-${{ github.event.release.tag_name }}-${{ matrix.platform.name }}.zip" + asset_name: "Release-${{ github.event.release.tag_name }}-${{ matrix.platform.name }}.zip" + asset_content_type: application/zip + + diff --git a/.github/workflows/windows-build.yml_ b/.github/workflows/windows-build.yml_ new file mode 100644 index 0000000..0f8cefa --- /dev/null +++ b/.github/workflows/windows-build.yml_ @@ -0,0 +1,52 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + +# This continuous integration pipeline is triggered anytime a user pushes code to the repo. +# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact. +name: Eve-O Preview Continuous Integration + +# Trigger on every master branch push and pull request +on: + push: + branches: + - master + - 'windows-build/*' + pull_request: + branches: + - master + - 'windows-build/*' + +jobs: + build: + name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }} + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + - { name: Linux, os: windows-2022 } + - { name: Windows, os: windows-2022 } + dotnet: + - { name: .NET 8, version: '8.0.x' } + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + +# - name: Setup .NET ${{ matrix.dotnet.version }} SDK +# id: setup-dotnet +# uses: actions/setup-dotnet@v3 +# with: +# dotnet-version: ${{ matrix.dotnet.version }} +# - name: Enforce SDK Version +# run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force +# - name: Verify SDK Installation +# run: dotnet --info + + - name: Restore + run: dotnet restore src\\Eve-O-Preview\\Eve-O-Preview.csproj + - name: Build + run: dotnet build src\\Eve-O-Preview\\Eve-O-Preview.csproj --configuration Release --no-restore -p:EVEOTARGET="${{matrix.platform.name}}" + #- name: Test + # run: dotnet test --no-restore --verbosity normal