diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b74ab79 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Visual Studio + +on: [push, pull_request] + +jobs: + build: + # Skip building pull requests from the same repository + if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} + runs-on: windows-2019 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Build + run: | + msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=x64 + xcopy bin\x64\*.dp64 package\x64\plugins\ + msbuild.exe ${{ github.event.repository.name }}.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=x86 + xcopy bin\x32\*.dp32 package\x32\plugins\ + + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-${{ github.sha }} + path: package/ + + - name: Compress artifacts + uses: papeloto/action-zip@v1 + if: ${{ startsWith(github.ref, 'refs/tags/') }} + with: + files: package/ + dest: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip + + - name: Release + uses: softprops/action-gh-release@v1 + if: ${{ startsWith(github.ref, 'refs/tags/') }} + with: + prerelease: ${{ contains(github.ref, '-pre') }} + files: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 162cf0e..7b0960f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ bin/ Release/ Debug/ x64/ +package/ .vs/ *.sdf *.opensdf diff --git a/release.bat b/release.bat deleted file mode 100644 index d10b9d1..0000000 --- a/release.bat +++ /dev/null @@ -1,4 +0,0 @@ -mkdir release\plugins\x32 -mkdir release\plugins\x64 -copy bin\x32\system.dp32 release\plugins\x32\ -copy bin\x64\system.dp64 release\plugins\x64\ \ No newline at end of file diff --git a/system/system.vcxproj b/system/system.vcxproj index d6541ef..aa5466e 100644 --- a/system/system.vcxproj +++ b/system/system.vcxproj @@ -27,7 +27,7 @@ DynamicLibrary false - v120_xp + v141_xp true MultiByte @@ -41,7 +41,7 @@ DynamicLibrary false - v120_xp + v141_xp true MultiByte