From 7250c9ac5fd49a0414e6b7e2f7ddffb35c61bbc2 Mon Sep 17 00:00:00 2001 From: Joel Van Eenwyk Date: Wed, 13 Mar 2024 18:00:27 -0700 Subject: [PATCH] Updated build actions Signed-off-by: Joel Van Eenwyk --- .github/workflows/build.yml | 78 +++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 835a19c..9abbcad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,12 +9,14 @@ on: jobs: build: - env: - buildConfig: "Release" - defaults: - run: - working-directory: src - runs-on: windows-latest + strategy: + fail-fast: false + matrix: + dotnet: [8.0.x, 6.0.x] + os: [windows-latest] + config: [Debug, Release] + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -23,46 +25,46 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: "6.0.x" - env: - NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} + # env: + # NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore --configuration ${{ env.buildConfig }} + run: dotnet build -c ${{ matrix.config }} --no-restore --self-contained --verbosity normal - - name: Create the package - id: create-package - run: | - $version = "$(Get-Date -Format "yyyy.MM.dd").${{ github.run_number }}"; - dotnet pack --configuration ${{ env.buildConfig }}; - Compress-Archive bin/Release/netcoreapp*/* bin/Release/netcoreapp*/Mycoshiro.Dataverse.LINQPad.lpx6 -Verbose; - echo "::set-output name=driverFileName::Mycoshiro.Dataverse.LINQPad_$version.lpx6"; - echo "::set-output name=driverFileVersion::$version"; + #- name: Create the package + # id: create-package + # run: | + # $version = "$(Get-Date -Format "yyyy.MM.dd").${{ github.run_number }}"; + # dotnet pack --configuration ${{ env.buildConfig }}; + # Compress-Archive bin/Release/netcoreapp*/* bin/Release/netcoreapp*/Mycoshiro.Dataverse.LINQPad.lpx6 -Verbose; + # echo "::set-output name=driverFileName::Mycoshiro.Dataverse.LINQPad_$version.lpx6"; + # echo "::set-output name=driverFileVersion::$version"; - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.create-package.outputs.driverFileVersion }} - release_name: ${{ steps.create-package.outputs.driverFileName }} - draft: true - prerelease: false + #- name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: ${{ steps.create-package.outputs.driverFileVersion }} + # release_name: ${{ steps.create-package.outputs.driverFileName }} + # draft: true + # prerelease: false - - name: Upload LINQPad Driver - id: release-managed-solution - if: steps.create_release.conclusion == 'success' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: bin/Release/netcoreapp*/Mycoshiro.Dataverse.LINQPad.lpx6 - asset_name: ${{ steps.create-package.outputs.driverFileName }} - asset_content_type: application/zip + #- name: Upload LINQPad Driver + # id: release-managed-solution + # if: steps.create_release.conclusion == 'success' + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: bin/Release/netcoreapp*/Mycoshiro.Dataverse.LINQPad.lpx6 + # asset_name: ${{ steps.create-package.outputs.driverFileName }} + # asset_content_type: application/zip #- name: Publish the package to GPR # run: dotnet nuget push bin/Release/*.nupkg