From 358d903e5514cd69ea7f5eec35d27dbca8eef112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=9CP?= <40131396+stop-pattern@users.noreply.github.com> Date: Sat, 3 Jan 2026 02:56:12 +0900 Subject: [PATCH 1/4] update actions version --- .github/workflows/build.yml | 6 +++--- .github/workflows/release.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 948575f..0b3fb01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,10 @@ jobs: runs-on: windows-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 - name: Setup .NET - uses: actions/setup-dotnet@v4.0.0 + uses: actions/setup-dotnet@v5.0.1 - name: Restore nuget packages run: dotnet restore BveExCsTemplate.sln --locked-mode @@ -37,7 +37,7 @@ jobs: shell: bash - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6.0.0 with: name: plugins path: ./plugins/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b547ea2..4088087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,9 +16,9 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 - name: Setup .NET - uses: actions/setup-dotnet@v4.0.0 + uses: actions/setup-dotnet@v5.0.1 - name: Restore nuget packages run: dotnet restore BveExCsTemplate.sln --locked-mode - name: Build sln @@ -41,7 +41,7 @@ jobs: } shell: pwsh - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6.0.0 with: name: plugins path: ./plugins/ @@ -55,9 +55,9 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 - name: Create tag - uses: rickstaa/action-create-tag@v1 + uses: rickstaa/action-create-tag@v1.7.2 id: "tag_create" with: tag: "${{needs.build.outputs.version}}" @@ -72,7 +72,7 @@ jobs: cd plugins/ zip ${{env.FILE_NAME}}.zip -r * - name: Create Release Draft and Upload Release Asset - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2.5.0 with: tag_name: ${{needs.build.outputs.version}} name: Release ${{needs.build.outputs.version}} From 3c37bb4e63779d7416d6b8d799fdec1a26cf11e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=9CP?= <40131396+stop-pattern@users.noreply.github.com> Date: Sat, 3 Jan 2026 02:59:29 +0900 Subject: [PATCH 2/4] add trigger --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b3fb01..75590c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: MSBuild on: + workflow_dispatch: pull_request: push: branches: From e54b8880e7dae9af4cebbcee7ad3dff4bca5120b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=9CP?= <40131396+stop-pattern@users.noreply.github.com> Date: Sat, 3 Jan 2026 03:09:24 +0900 Subject: [PATCH 3/4] fix move error --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 75590c9..5977390 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: run: | ls -alR mkdir plugins/ - find . -type f -path '*/out/publish/*.dll' | xargs mv -t ./plugins/ + find . -type f -path '*/out/publish/*.dll' -exec cp {} ./plugins/ \; shell: bash - name: Upload artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4088087..2d60b31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Collect artifact run: | mkdir plugins/ - find . -type f -path '*/out/publish/*.dll' | xargs mv -t ./plugins/ + find . -type f -path '*/out/publish/*.dll' -exec cp {} ./plugins/ \; shell: bash - name: Check assembly version id: version From b203731ce5f037896ed874d1bc6fb0d1082834be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=9CP?= <40131396+stop-pattern@users.noreply.github.com> Date: Sat, 3 Jan 2026 03:26:18 +0900 Subject: [PATCH 4/4] update workflow --- .github/workflows/release.yml | 53 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d60b31..e8f715b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,18 +26,40 @@ jobs: - name: Collect artifact run: | mkdir plugins/ - find . -type f -path '*/out/publish/*.dll' -exec cp {} ./plugins/ \; + # 各プロジェクトディレクトリからプロジェクト名と同じDLLのみを収集 + find . -maxdepth 2 -name "*.csproj" -type f | while read csproj; do + proj_dir=$(dirname "$csproj") + proj_name=$(basename "$csproj" .csproj) + dll_path="${proj_dir}/out/publish/${proj_name}.dll" + if [ -f "$dll_path" ]; then + echo "Collecting: $dll_path" + cp "$dll_path" ./plugins/ + else + echo "Warning: $dll_path not found" + fi + done + # 収集結果を表示 + echo "Collected DLLs:" + ls -lh ./plugins/ shell: bash - name: Check assembly version id: version run: | - Get-ChildItem plugins/ -Recurse -Filter "*.dll" -File | foreach { - Write-Output $_.FileName - $_.FileName - "name=$_" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - $ver=(Get-Item $_.FullName).VersionInfo.FileVersion - $ver - "version=v$ver" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + $files = Get-ChildItem plugins/ -Filter "*.dll" -File + if ($files.Count -eq 0) { + Write-Error "No DLL files found in plugins/" + exit 1 + } + + Write-Output "=== DLL Version Check ===" + $firstVersion = $null + foreach ($file in $files) { + $ver = (Get-Item $file.FullName).VersionInfo.FileVersion + Write-Output "$($file.Name): v$ver" + if ($null -eq $firstVersion) { + $firstVersion = $ver + "version=v$ver" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + } } shell: pwsh - name: Upload artifact @@ -56,6 +78,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6.0.1 + - name: Download artifact + uses: actions/download-artifact@v6.0.0 + with: + name: plugins + path: ./plugins/ - name: Create tag uses: rickstaa/action-create-tag@v1.7.2 id: "tag_create" @@ -63,14 +90,6 @@ jobs: tag: "${{needs.build.outputs.version}}" tag_exists_error: true message: "Created tag ${{needs.build.outputs.version}}" - - name: Get repository name - run: | - echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" >> $GITHUB_ENV - echo "FILE_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}_${{needs.build.outputs.version}}" >> $GITHUB_ENV - - name: Compress DLLs - run: | - cd plugins/ - zip ${{env.FILE_NAME}}.zip -r * - name: Create Release Draft and Upload Release Asset uses: softprops/action-gh-release@v2.5.0 with: @@ -80,5 +99,5 @@ jobs: draft: true prerelease: false files: | - ./plugins/${{env.FILE_NAME}}.zip + ./plugins/*.dll LICENSE