fix: add runtimeobject.lib to resolve unresolved symbols
#29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: publish | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| env: | |
| BUILD_CONFIGURATION: Release | |
| jobs: | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v1 | |
| - name: Setup Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Get version from tag | |
| id: get-version | |
| run: echo ("version=" + $env:GITHUB_REF.replace('refs/tags/v', '')) >> $env:GITHUB_OUTPUT | |
| - name: Install cert | |
| shell: pwsh | |
| run: | | |
| $pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx" | |
| $encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT) | |
| Set-Content $pfxPath -Value $encodedBytes -AsByteStream | |
| Import-PfxCertificate -FilePath $pfxPath -CertStoreLocation Cert:\CurrentUser\My | |
| Remove-Item -Path $pfxPath | |
| env: | |
| PFX_CONTENT: ${{ secrets.PFX_CONTENT }} | |
| - name: Set api key for Chocolatey | |
| run: | | |
| choco apikey --key $env:CHOCOLATEY_API_KEY --source https://push.chocolatey.org/ | |
| env: | |
| CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} | |
| - name: Set version in Appx Manifest | |
| run: | | |
| $version = [System.Version]::Parse("${{ steps.get-version.outputs.version }}") | |
| $version = [System.Version]::new([math]::Max($version.Major, 0), [math]::Max($version.Minor, 0), [math]::Max($version.Build, 0), [math]::Max($version.Revision, 0)) | |
| [xml]$manifest = Get-Content (Resolve-Path ".\TextECodeCLIWap\Package.appxmanifest") | |
| $manifest.Package.Identity.Version = $version.ToString(4) | |
| $manifest.save((Resolve-Path ".\TextECodeCLIWap\Package.appxmanifest")) | |
| shell: pwsh | |
| - name: Restore | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| msbuild "TextECode.sln" "/t:Restore" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};Platform=x64" | |
| msbuild "TextECodeCLI\TextECodeCLI.csproj" "/t:Restore" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};DeployOnBuild=true;PublishProfile=TextECodeCLI\Properties\PublishProfiles\publish-win-x64-self-contained.pubxml" | |
| msbuild "TextECodeCLI\TextECodeCLI.csproj" "/t:Restore" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};DeployOnBuild=true;PublishProfile=TextECodeCLI\Properties\PublishProfiles\publish-win-x86-self-contained.pubxml" | |
| - name: Build | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| msbuild "TextECode.sln" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};Platform=x64" | |
| msbuild "TextECodeCLI\TextECodeCLI.csproj" "/t:publish" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};DeployOnBuild=true;PublishProfile=TextECodeCLI\Properties\PublishProfiles\publish-win-x64-self-contained.pubxml" | |
| msbuild "TextECodeCLI\TextECodeCLI.csproj" "/t:publish" "/p:Configuration=${{ env.BUILD_CONFIGURATION }};Version=${{ steps.get-version.outputs.version }};DeployOnBuild=true;PublishProfile=TextECodeCLI\Properties\PublishProfiles\publish-win-x86-self-contained.pubxml" | |
| - name: Archive | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| Compress-Archive -Path ".\TextECodeCLIWap\AppPackages\*" -DestinationPath "${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Appx.zip" | |
| Rename-Item -Path ".\TextECodeCLI\publish\win-x64" -NewName "TextECode_${{ steps.get-version.outputs.version }}_Portable_x64" | |
| Compress-Archive -Path ".\TextECodeCLI\publish\TextECode_${{ steps.get-version.outputs.version }}_Portable_x64" -DestinationPath "${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x64.zip" | |
| Rename-Item -Path ".\TextECodeCLI\publish\win-x86" -NewName "TextECode_${{ steps.get-version.outputs.version }}_Portable_x86" | |
| Compress-Archive -Path ".\TextECodeCLI\publish\TextECode_${{ steps.get-version.outputs.version }}_Portable_x86" -DestinationPath "${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x86.zip" | |
| Rename-Item -Path ".\TextECodeCLI\publish\win-x64-self-contained" -NewName "TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x64" | |
| Compress-Archive -Path ".\TextECodeCLI\publish\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x64" -DestinationPath "${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x64.zip" | |
| Rename-Item -Path ".\TextECodeCLI\publish\win-x86-self-contained" -NewName "TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x86" | |
| Compress-Archive -Path ".\TextECodeCLI\publish\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x86" -DestinationPath "${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x86.zip" | |
| - name: Release (GitHub) | |
| uses: softprops/action-gh-release@v0.1.13 | |
| with: | |
| files: | | |
| ${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Appx.zip | |
| ${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x86.zip | |
| ${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x64.zip | |
| ${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x86.zip | |
| ${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_SelfContained_x64.zip | |
| - name: Release (Chocolatey) | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| $checksumAppx = (Get-FileHash -LiteralPath '${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Appx.zip' -Algorithm SHA512).Hash | |
| $checksumPortable_x86 = (Get-FileHash -LiteralPath '${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x86.zip' -Algorithm SHA512).Hash | |
| $checksumPortable_x64 = (Get-FileHash -LiteralPath '${{ runner.temp }}\TextECode_${{ steps.get-version.outputs.version }}_Portable_x64.zip' -Algorithm SHA512).Hash | |
| cd ${{ github.workspace }}/ChocolateyPackages/textecode.install | |
| ./config.ps1 -Version ${{ steps.get-version.outputs.version }} -ChecksumAppx $checksumAppx -ChecksumPortable_x86 $checksumPortable_x86 -ChecksumPortable_x64 $checksumPortable_x64 | |
| choco pack | |
| choco push --source https://push.chocolatey.org/ | |
| cd ${{ github.workspace }}/ChocolateyPackages/textecode | |
| ./config.ps1 -Version ${{ steps.get-version.outputs.version }} | |
| choco pack | |
| choco push --source https://push.chocolatey.org/ |