From d778098b31a19a27c7b7b0bb63f22f1b7c97249d Mon Sep 17 00:00:00 2001 From: Vaclav Elias Date: Sat, 2 Nov 2024 23:01:48 +0000 Subject: [PATCH] chore: Clean up of unused GitHub actions Remove self-hosted workflow files and update solution Removed `dotnet-nuget-self-hosted.yml` and `dotnet-self-hosted.yml` workflow files, which were responsible for building, testing, and publishing the Stride Community Toolkit and its Skyboxes using a self-hosted runner. Updated `Stride.CommunityToolkit.sln` to remove references to these deleted workflow files from the "Solution Items" section. --- .../workflows/dotnet-nuget-self-hosted.yml | 79 ------------------- .github/workflows/dotnet-self-hosted.yml | 54 ------------- Stride.CommunityToolkit.sln | 2 - 3 files changed, 135 deletions(-) delete mode 100644 .github/workflows/dotnet-nuget-self-hosted.yml delete mode 100644 .github/workflows/dotnet-self-hosted.yml diff --git a/.github/workflows/dotnet-nuget-self-hosted.yml b/.github/workflows/dotnet-nuget-self-hosted.yml deleted file mode 100644 index bf85c9e..0000000 --- a/.github/workflows/dotnet-nuget-self-hosted.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Self-Hosted .NET Build and Publish Nuget - -env: - PROJECT_PATH_CORE: src/Stride.CommunityToolkit/Stride.CommunityToolkit.csproj - PROJECT_PATH_SKYBOX: src\Stride.CommunityToolkit.Skyboxes\Stride.CommunityToolkit.Skyboxes.csproj - COMMON_SETTINGS_PATH: src/CommonSettings.props - VERSION: "1.0.0.0-preview.${{ github.run_number }}" - -on: - workflow_dispatch: - -jobs: - build: - runs-on: self-hosted - - steps: - - name: Checkout Stride Community Toolkit - uses: actions/checkout@v4 - - - name: .NET Setup - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Set Version in csproj - run: | - $settingsContent = Get-Content -Path ${{ env.COMMON_SETTINGS_PATH }} -Raw - $updatedCsprojContent = $settingsContent -replace '.*?', "${{ env.VERSION }}" - Set-Content -Path ${{ env.COMMON_SETTINGS_PATH }} -Value $updatedCsprojContent - - # Stride.CommunityToolkit - - name: Restore dependencies - Stride.CommunityToolkit - run: dotnet restore ${{ env.PROJECT_PATH_CORE }} - - - name: Build - run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore - -# - name: Copy System.Security.Cryptography.Pkcs DLL to output directory -# run: | -# Copy-Item "c:\Users\Vacla\.nuget\packages\system.security.cryptography.pkcs\6.0.4\lib\net6.0\System.Security.Cryptography.Pkcs.dll" -Destination "src/Stride.CommunityToolkit/bin/Debug/net8.0/" -# shell: pwsh - - - name: Test - run: dotnet test ${{ env.PROJECT_PATH_CORE }} --no-build --verbosity normal - -# - name: Publish Stride Community Toolkit -# run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} - - - name: Publish Stride Community Toolkit - uses: alirezanet/publish-nuget@v3.1.0 - with: - PROJECT_FILE_PATH: ${{ env.PROJECT_PATH_CORE }} - VERSION_FILE_PATH: ${{ env.COMMON_SETTINGS_PATH }} - NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - # Stride.CommunityToolkit.Skyboxes - - name: Restore dependencies - Stride.CommunityToolkit.Skyboxes - run: dotnet restore ${{ env.PROJECT_PATH_SKYBOX }} - - - name: Build - run: dotnet build ${{ env.PROJECT_PATH_SKYBOX }} --no-restore - - - name: Test - run: dotnet test ${{ env.PROJECT_PATH_SKYBOX }} --no-build --verbosity normal - - - name: Publish Stride Community Toolkit - Skyboxes - uses: alirezanet/publish-nuget@v3.1.0 - with: - PROJECT_FILE_PATH: ${{ env.PROJECT_PATH_SKYBOX }} - VERSION_FILE_PATH: ${{ env.COMMON_SETTINGS_PATH }} - NUGET_KEY: ${{secrets.NUGET_API_KEY}} - TAG_COMMIT: false - - # Create release - - name: Create GitHub Release - run: | - gh release create ${{ env.VERSION }} --title "v${{ env.VERSION }}" --notes "Release notes for ${{ env.VERSION }}" --draft - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dotnet-self-hosted.yml b/.github/workflows/dotnet-self-hosted.yml deleted file mode 100644 index 193ae9b..0000000 --- a/.github/workflows/dotnet-self-hosted.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Self-Hosted .NET Build Test - -env: - PROJECT_PATH_CORE: src\Stride.CommunityToolkit\Stride.CommunityToolkit.csproj - PROJECT_PATH_SKYBOX: src\Stride.CommunityToolkit.Skyboxes\Stride.CommunityToolkit.Skyboxes.csproj - -on: - workflow_dispatch: - -jobs: - build: - runs-on: self-hosted - - steps: - - name: Checkout Stride Community Toolkit - uses: actions/checkout@v4 - - - name: .NET Setup - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Restore Stride.CommunityToolkit dependencies - run: dotnet restore ${{ env.PROJECT_PATH_CORE }} - - # - name: Get NuGet global-packages location - # id: nuget-cache - # run: | - # $cacheDir = dotnet nuget locals global-packages --list | Out-String - # $path = $cacheDir -replace "global-packages: ", "" -replace "`r`n", "" - # echo "NUGET_CACHE_DIR=$path" | Out-File -FilePath $env:GITHUB_ENV -Append - # shell: pwsh - - # - name: List contents of System.Security.Cryptography.Pkcs package directory - # run: | - # Get-ChildItem "${{ env.NUGET_CACHE_DIR }}\system.security.cryptography.pkcs\" -Recurse | Select-Object FullName - # shell: pwsh - - - name: Build Stride.CommunityToolkit - run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore - - # - name: Copy System.Security.Cryptography.Pkcs DLL to output directory - # run: | - # Copy-Item "c:\Users\Vacla\.nuget\packages\system.security.cryptography.pkcs\6.0.4\lib\net6.0\System.Security.Cryptography.Pkcs.dll" -Destination "src/Stride.CommunityToolkit/bin/Debug/net8.0/" - # shell: pwsh - - - name: Test Stride.CommunityToolkit - run: dotnet test ${{ env.PROJECT_PATH_CORE }} --no-build --verbosity normal - - - name: Restore Stride.CommunityToolkit.Skyboxes dependencies - run: dotnet restore ${{ env.PROJECT_PATH_SKYBOX }} - - - name: Build Stride.CommunityToolkit.Skyboxes - run: dotnet build ${{ env.PROJECT_PATH_SKYBOX }} --no-restore diff --git a/Stride.CommunityToolkit.sln b/Stride.CommunityToolkit.sln index 55381e7..6ca6c0b 100644 --- a/Stride.CommunityToolkit.sln +++ b/Stride.CommunityToolkit.sln @@ -12,9 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject src\CommonSettings.props = src\CommonSettings.props Directory.Build.props = Directory.Build.props - .github\workflows\dotnet-nuget-self-hosted.yml = .github\workflows\dotnet-nuget-self-hosted.yml .github\workflows\dotnet-nuget.yml = .github\workflows\dotnet-nuget.yml - .github\workflows\dotnet-self-hosted.yml = .github\workflows\dotnet-self-hosted.yml .github\workflows\dotnet.yml = .github\workflows\dotnet.yml .github\workflows\github-pages.yml = .github\workflows\github-pages.yml README.md = README.md