From 52ee5b2e4d7dd4902d1fb1d81dee39cc8c843cea Mon Sep 17 00:00:00 2001 From: xztaityozx Date: Sat, 15 Jun 2024 18:33:55 +0900 Subject: [PATCH 1/2] chore: bump up dotnet 8.0 --- noc/Test/Test.csproj | 4 +++- noc/noc/noc.csproj | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/noc/Test/Test.csproj b/noc/Test/Test.csproj index 0c0eb94..3e9f63a 100644 --- a/noc/Test/Test.csproj +++ b/noc/Test/Test.csproj @@ -1,9 +1,11 @@  - net7.0 + net8.0 false + + 12 diff --git a/noc/noc/noc.csproj b/noc/noc/noc.csproj index d5dcfbb..c888b36 100644 --- a/noc/noc/noc.csproj +++ b/noc/noc/noc.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 win-x64;linux-x64;osx-x64 1.2 @@ -12,6 +12,7 @@ 2.0.0.0 2.0.0.0 + 12 From e88f5a0fb504a191d84c9417cfb4aefa6439af90 Mon Sep 17 00:00:00 2001 From: xztaityozx Date: Sat, 15 Jun 2024 18:38:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E3=81=93=E3=81=A1=E3=82=89?= =?UTF-8?q?=E3=82=82dotnet8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnet-core.yml | 130 +----------------------------- 1 file changed, 4 insertions(+), 126 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 53b141c..32b5bff 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet-version: [7.0.x] + dotnet-version: [8.0.x] env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -17,139 +17,17 @@ jobs: NUGET_XMLDOC_MODE: skip steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v1 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ${{ github.workspace }}/.nuget/packages key: nuget-${{ matrix.os }}-${{ matrix.dotnet-version }} restore-keys: | nuget-${{ matrix.os }}- - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet-version }} - name: Test working-directory: ./noc/Test run: dotnet test --verbosity normal -c Debug - - dotnet-publish: - if: contains(github.ref, 'tags/v') - strategy: - matrix: - os: [windows-latest, ubuntu-latest, macOS-latest] - dotnet-version: [7.0.x] - runs-on: ${{ matrix.os }} - env: - NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages - NUGET_XMLDOC_MODE: skip - steps: - - name: vars - id: vars - shell: bash - run: | - echo ::set-output name=version::${TAG_REF_NAME##*/v} - echo ::set-output name=runtime_id::"$(echo ${{ matrix.os }} | sed 's/windows/win/;s/ubuntu/linux/;s/macOS/osx/;s/latest/x64/')" - env: - TAG_REF_NAME: ${{ github.ref }} - - - uses: actions/checkout@v3 - - - uses: actions/cache@v2 - with: - path: ${{ github.workspace }}/.nuget/packages - key: nuget-${{ matrix.os }}-${{ matrix.dotnet-version }} - restore-keys: | - nuget-${{ matrix.os }}- - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - - name: dotnet publish - working-directory: ./noc/noc - run: | - dotnet publish -c Release -r ${{ steps.vars.outputs.runtime_id }} --self-contained true -p:Version=${{ steps.vars.outputs.version }} -o ${{ steps.vars.outputs.runtime_id }} - - - name: Upload build result - uses: actions/upload-artifact@v1 - with: - name: ${{ steps.vars.outputs.runtime_id }} - path: noc/noc/${{ steps.vars.outputs.runtime_id }} - - create-releases: - name: Create GitHub Release - if: contains(github.ref, 'tags/v') - needs: [test, dotnet-publish] - runs-on: ubuntu-latest - steps: - - name: vars - id: vars - shell: bash - run: | - echo ::set-output name=version::${TAG_REF_NAME##*/} - env: - TAG_REF_NAME: ${{ github.ref }} - - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.vars.outputs.version }} - release_name: Release ${{ steps.vars.outputs.version }} - draft: false - prerelease: false - - - name: Output Release URL File - run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt - - - name: Save Release URL File for publish - uses: actions/upload-artifact@v1 - with: - name: release_url - path: release_url.txt - - upload-release: - name: Upload artifacts to GitHub Release - if: contains(github.ref, 'tags/v') - strategy: - matrix: - runtime_id: [win-x64, linux-x64, osx-x64] - runs-on: ubuntu-latest - needs: [dotnet-publish, create-releases, test] - steps: - - uses: actions/download-artifact@v2 - with: - name: ${{ matrix.runtime_id }} - path: ${{ matrix.runtime_id }} - - - uses: actions/download-artifact@v2 - with: - name: release_url - - - name: Get Release Info - id: get_release_info - shell: bash - run: | - echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} - echo ::set-output name=upload_url::"$(cat release_url.txt)" - echo ::set-output name=version::${TAG_REF_NAME##*/v} - env: - TAG_REF_NAME: ${{ github.ref }} - REPOSITORY_NAME: ${{ github.repository }} - - - name: zip - run: | - zip -r ${{ matrix.runtime_id }} ${{ matrix.runtime_id }} - - name: Upload assets to GitHub Release - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ./${{ matrix.runtime_id }}.zip - asset_name: ${{ steps.get_release_info.outputs.file_name }}-${{ matrix.runtime_id }}.zip - asset_content_type: application/zip