diff --git a/.github/workflows/cosmocc.yml b/.github/workflows/cosmocc.yml index f70c620827..705dfa958e 100644 --- a/.github/workflows/cosmocc.yml +++ b/.github/workflows/cosmocc.yml @@ -23,6 +23,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + + - uses: little-core-labs/get-git-tag@v3.0.2 + id: tagName - name: Prepare local xmake run: cp -rf . ../xmake-source @@ -71,7 +74,19 @@ jobs: rm -r "${INSTALL_DIR}" - name: Artifact + if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: - name: xmake-bundle.cosmocc + name: xmake-bundle.cosmocc.x86_64 path: core/build/xmake + + - name: Publish bundle binary + if: github.event.action == 'published' && matrix.os == 'ubuntu-latest' + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: core/build/xmake + asset_name: xmake-bundle-${{ steps.tagName.outputs.tag }}.cosmocc.x86_64 + asset_content_type: application/zip