From 1892b900cd8e114f44b59a36dd97ba6d4a2ebd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Sat, 31 Aug 2024 18:03:21 +0800 Subject: [PATCH 01/10] change msbuild files --- .github/workflows/msbuild.yml | 24 +++++++++--------------- package.ps1 | 6 +++--- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index b79deed..29a1128 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -8,12 +8,7 @@ on: branches: [ "stable" ] env: - # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: . - - # Configuration type to build. - # You can convert this to a build matrix if you need coverage of multiple configuration types. - # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix BUILD_CONFIGURATION: Release permissions: @@ -35,25 +30,24 @@ jobs: - name: Build x64 working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}} - name: Build x86 working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}} - name: Archive Builds working-directory: ${{env.GITHUB_WORKSPACE}} run: powershell.exe ./package.ps1 - - name: Upload a Build Artifact + - name: Upload x86 Build Artifact + uses: actions/upload-artifact@v3.1.2 + with: + name: Release-x86 + path: Release-x86.zip + + - name: Upload x64 Build Artifact uses: actions/upload-artifact@v3.1.2 with: - # Artifact name - name: AutoBuild - # A file, directory or wildcard pattern that describes what to upload - path: Release.zip - # The desired behavior if no files are found using the provided path. + name: Release-x64 + path: Release-x64.zip diff --git a/package.ps1 b/package.ps1 index 1c53a47..97abee3 100644 --- a/package.ps1 +++ b/package.ps1 @@ -1,4 +1,3 @@ - mkdir ".\ReleasePackage" mkdir ".\ReleasePackage\x86" @@ -7,6 +6,7 @@ cp -Recurse .\Release\* .\ReleasePackage\x86 mkdir ".\ReleasePackage\x64" cp -Recurse .\x64\Release\* .\ReleasePackage\x64 -(".\ReleasePackage\x64",".\ReleasePackage\x86") | Compress-Archive -DestinationPath Release.zip -Force +Compress-Archive -Path .\ReleasePackage\x86 -DestinationPath Release-x86.zip -Force +Compress-Archive -Path .\ReleasePackage\x64 -DestinationPath Release-x64.zip -Force -del -Recurse ReleasePackage \ No newline at end of file +del -Recurse ReleasePackage From f783fbbc7bc69fcc47e4985bbab60ded247f138d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Sat, 31 Aug 2024 18:49:25 +0800 Subject: [PATCH 02/10] change github actions --- .github/workflows/msbuild.yml | 16 +++++++--------- package.ps1 | 12 ------------ 2 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 package.ps1 diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 29a1128..68f905d 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} @@ -36,18 +36,16 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}} - - name: Archive Builds - working-directory: ${{env.GITHUB_WORKSPACE}} - run: powershell.exe ./package.ps1 - - name: Upload x86 Build Artifact - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@v4.4.0 with: name: Release-x86 - path: Release-x86.zip + path: .\Release + if-no-files-found: error - name: Upload x64 Build Artifact - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@v4.4.0 with: name: Release-x64 - path: Release-x64.zip + path: .\x64\Release\ + if-no-files-found: error \ No newline at end of file diff --git a/package.ps1 b/package.ps1 deleted file mode 100644 index 97abee3..0000000 --- a/package.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -mkdir ".\ReleasePackage" - -mkdir ".\ReleasePackage\x86" -cp -Recurse .\Release\* .\ReleasePackage\x86 - -mkdir ".\ReleasePackage\x64" -cp -Recurse .\x64\Release\* .\ReleasePackage\x64 - -Compress-Archive -Path .\ReleasePackage\x86 -DestinationPath Release-x86.zip -Force -Compress-Archive -Path .\ReleasePackage\x64 -DestinationPath Release-x64.zip -Force - -del -Recurse ReleasePackage From 32c9b6863a74c057393d3d2f52f3602fb23fc2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Sat, 31 Aug 2024 22:38:21 +0800 Subject: [PATCH 03/10] Update CasioEmuMsvc.sln --- CasioEmuMsvc.sln | 1 - 1 file changed, 1 deletion(-) diff --git a/CasioEmuMsvc.sln b/CasioEmuMsvc.sln index 5105766..1843816 100644 --- a/CasioEmuMsvc.sln +++ b/CasioEmuMsvc.sln @@ -14,7 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决 convert_all_lua_config.ps1 = convert_all_lua_config.ps1 GB2UTF8.ps1 = GB2UTF8.ps1 LICENSE = LICENSE - package.ps1 = package.ps1 README.md = README.md EndProjectSection EndProject From d6f76cf4cffc57b38c681ffd16fad5088ef8d45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:30:22 +0800 Subject: [PATCH 04/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f07f98..40fab37 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![CasioEmuMsvc](https://socialify.git.ci/Physics365/CasioEmuMsvc/image?description=1&descriptionEditable=Msvc%20version%20of%20CasioEmu%0AA%20fork%20of%20telecomadm1145%2FCasioEmuMsvc&font=Source%20Code%20Pro&forks=1&issues=1&language=1&logo=https%3A%2F%2Fi.ibb.co%2FFg833j1%2FOIP-removebg-preview-333.png&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Auto) + # CasioEmuMsvc An emulator for nX-U16/100 MCU (and nX-U8/100 MCU as well). @@ -10,4 +12,4 @@ With debugger and built-in disassembler. * Clone this repo -* Build with VS or using `msbuild` \ No newline at end of file +* Build with VS or using `msbuild` From 1544d9a927aff7c2286e029f6bd9949dbb9c00a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:33:43 +0800 Subject: [PATCH 05/10] Update msbuild.yml --- .github/workflows/msbuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 68f905d..bc5e6af 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -19,7 +19,8 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4.17 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 @@ -48,4 +49,4 @@ jobs: with: name: Release-x64 path: .\x64\Release\ - if-no-files-found: error \ No newline at end of file + if-no-files-found: error From f0a3455c055a223caad70c342aee630e1817bd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:35:00 +0800 Subject: [PATCH 06/10] Update msbuild.yml --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index bc5e6af..5d6d326 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.17 + uses: actions/checkout@v4.1.7 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 From b5b9061e40c530f2d4d5dfd3506836dfc6597c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:30:22 +0800 Subject: [PATCH 07/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f07f98..40fab37 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![CasioEmuMsvc](https://socialify.git.ci/Physics365/CasioEmuMsvc/image?description=1&descriptionEditable=Msvc%20version%20of%20CasioEmu%0AA%20fork%20of%20telecomadm1145%2FCasioEmuMsvc&font=Source%20Code%20Pro&forks=1&issues=1&language=1&logo=https%3A%2F%2Fi.ibb.co%2FFg833j1%2FOIP-removebg-preview-333.png&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Auto) + # CasioEmuMsvc An emulator for nX-U16/100 MCU (and nX-U8/100 MCU as well). @@ -10,4 +12,4 @@ With debugger and built-in disassembler. * Clone this repo -* Build with VS or using `msbuild` \ No newline at end of file +* Build with VS or using `msbuild` From 0196ffab6a4bff79187d0a16bf0ddeb82c960d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:33:43 +0800 Subject: [PATCH 08/10] Update msbuild.yml --- .github/workflows/msbuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 68f905d..bc5e6af 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -19,7 +19,8 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4.17 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 @@ -48,4 +49,4 @@ jobs: with: name: Release-x64 path: .\x64\Release\ - if-no-files-found: error \ No newline at end of file + if-no-files-found: error From 401437c379ba60ae503c05125190e793a5300e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 19:35:00 +0800 Subject: [PATCH 09/10] Update msbuild.yml --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index bc5e6af..5d6d326 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.17 + uses: actions/checkout@v4.1.7 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 From e61aee0f97713aa95243ff6286b742d2a846334f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=85=83=E7=9A=93?= Date: Fri, 6 Sep 2024 20:23:43 +0800 Subject: [PATCH 10/10] Create Release.yml --- .github/workflows/Release.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..32101c1 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,54 @@ +name: MSBuild and Release + +on: + push: + tags: + - "v*.*.*" + +env: + SOLUTION_FILE_PATH: . + BUILD_CONFIGURATION: Release + +permissions: + contents: write + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.1.7 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} + + - name: Build x64 + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}} + + - name: Build x86 + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}} + + - name: Compress x64 Output + run: Compress-Archive -Path .\x64\Release\ -DestinationPath Release-x64.zip + shell: pwsh + + - name: Compress x86 Output + run: Compress-Archive -Path .\Release\ -DestinationPath Release-x86.zip + shell: pwsh + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v2.0.8 + with: + files: | + Release-x64.zip + Release-x86.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}