diff options
| author | ruki <[email protected]> | 2020-08-26 23:29:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-08-26 23:29:55 +0800 |
| commit | e0cfa51d2ef245b4d003c2d72ace9781477d26e7 (patch) | |
| tree | e030454de3f3e282a406f122dbf98c62b51d3341 | |
| parent | eec4437eeefde00f583a26eab860641975c5613b (diff) | |
add xmake-tinyc artifacts for win/ci
| -rw-r--r-- | .github/workflows/windows.yml | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b3fc910b1..b94a731bb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -81,6 +81,20 @@ jobs: Copy-Item ./curl-ca-bundle.crt ./winenv/bin $version = (Get-Command xmake/xmake.exe).FileVersionInfo ./nsis/makensis.exe /DMAJOR=$($version.ProductMajorPart) /DMINOR=$($version.ProductMinorPart) /DALTER=$($version.ProductBuildPart) /DBUILD=$($($version.ProductVersion -split '\+')[1]) /D${{ matrix.arch }} .\scripts\installer.nsi + Copy-Item scripts/xmake.exe ./artifacts/${{env.RELEASE_NAME}}/xmake.exe + # build installer for tinyc + if ("${{ matrix.arch }}" -eq "x64"){ + Invoke-WebRequest "http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win64-bin.zip" -UseBasicParsing -OutFile .\tcc.zip + } else { + Invoke-WebRequest "http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win32-bin.zip" -UseBasicParsing -OutFile .\tcc.zip + } + Expand-Archive ./tcc.zip -DestinationPath ./winenv/tcc + Invoke-WebRequest "http://download.savannah.gnu.org/releases/tinycc/winapi-full-for-0.9.27.zip" -UseBasicParsing -OutFile .\winapi.zip + Expand-Archive ./winapi.zip -DestinationPath ./winenv/tcc/winapi + ./nsis/makensis.exe /DMAJOR=$($version.ProductMajorPart) /DMINOR=$($version.ProductMinorPart) /DALTER=$($version.ProductBuildPart) /DBUILD=$($($version.ProductVersion -split '\+')[1]) /D${{ matrix.arch }} .\scripts\installer.nsi + Copy-Item scripts/xmake.exe ./artifacts/${{env.RELEASE_NAME}}/xmake-tinyc.exe + Remove-Item ./winenv/tcc -Recurse + Remove-Item ./scripts/xmake.exe # archive Copy-Item ./*.md ./xmake Copy-Item ./winenv ./xmake -Recurse @@ -99,7 +113,6 @@ jobs: (Get-FileHash .\archive.zip -Algorithm SHA256).Hash.ToLower() + " *xmake.zip`n" | Out-File ./shafile -Encoding ASCII -NoNewLine -Append # copy to artifacts/arch (New-Item ./artifacts/${{env.RELEASE_NAME}} -ItemType Directory).FullName - Copy-Item scripts/xmake.exe ./artifacts/${{env.RELEASE_NAME}} Copy-Item archive.zip ./artifacts/${{env.RELEASE_NAME}} Copy-Item shafile ./artifacts/${{env.RELEASE_NAME}} @@ -110,6 +123,10 @@ jobs: path: artifacts/${{env.RELEASE_NAME}}/xmake.exe - uses: actions/upload-artifact@v2 with: + name: xmake-tinyc-latest.${{env.RELEASE_NAME}}.exe + path: artifacts/${{env.RELEASE_NAME}}/xmake-tinyc.exe + - uses: actions/upload-artifact@v2 + with: name: xmake-latest.${{ env.RELEASE_NAME }}.zip path: artifacts/${{env.RELEASE_NAME}}/archive.zip - uses: actions/upload-artifact@v2 @@ -136,6 +153,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/${{env.RELEASE_NAME}}/xmake-tinyc.exe + asset_name: xmake-tinyc-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.exe + asset_content_type: application/zip + + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} asset_path: artifacts/${{env.RELEASE_NAME}}/archive.zip asset_name: xmake-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.zip asset_content_type: application/zip |
