diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a74f60b..bf80ebc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,4 +29,10 @@ jobs: with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | - bin/ + bin/DLL/ + + - uses: actions/upload-artifact@v3 + with: + name: PDB + path: | + bin/PDB/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48a0138..d01ad80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,13 @@ jobs: with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | - bin/ + bin/DLL/ + + - uses: actions/upload-artifact@v3 + with: + name: PDB + path: | + bin/PDB/ upload-to-release: needs: @@ -38,24 +44,35 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - name: Download Plugin + uses: actions/download-artifact@v3 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} - path: release/ + path: release/Plugin/ - - run: | - cp LICENSE README.md release/ + - name: Download PDB + uses: actions/download-artifact@v3 + with: + name: PDB + path: release/PDB/ + + - name: Copy additional files + run: | + cp LICENSE README.md release/Plugin/ - name: Archive release run: | - cd release + cd release/Plugin zip -r ../${{ github.event.repository.name }}-windows-x64.zip * cd .. - - uses: softprops/action-gh-release@v1 + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@v1 with: - append_body: true files: | - ${{ github.event.repository.name }}-windows-x64.zip + release/${{ github.event.repository.name }}-windows-x64.zip + release/PDB/${{ github.event.repository.name }}.pdb diff --git a/scripts/after_build.lua b/scripts/after_build.lua index 9475b5a..cb06906 100644 --- a/scripts/after_build.lua +++ b/scripts/after_build.lua @@ -88,10 +88,11 @@ function pack_plugin(target,plugin_define) local manifest_path = find_file("manifest.json", os.projectdir()) if manifest_path then local manifest = io.readfile(manifest_path) - local bindir = path.join(os.projectdir(), "bin") + local bindir = path.join(os.projectdir(), "bin/DLL") + local pdbdir = path.join(os.projectdir(), "bin/PDB") local outputdir = path.join(bindir, plugin_define.pluginName) local targetfile = path.join(outputdir, plugin_define.pluginFile) - local pdbfile = path.join(outputdir, path.basename(plugin_define.pluginFile) .. ".pdb") + local pdbfile = path.join(pdbdir, path.basename(plugin_define.pluginFile) .. ".pdb") local manifestfile = path.join(outputdir, "manifest.json") local oritargetfile = target:targetfile() local oripdbfile = path.join(path.directory(oritargetfile), path.basename(oritargetfile) .. ".pdb")