From 18d9b70153d64b507b7c2e501e523d40df439031 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 17 Jan 2025 21:49:08 +0800 Subject: Update cosmocc.yml --- .github/workflows/cosmocc.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cosmocc.yml b/.github/workflows/cosmocc.yml index f70c62082..705dfa958 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 -- cgit v1.3.1