diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5af6f7a..ddab927b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,3 +71,21 @@ jobs: - name: Run benchmarks run: script/benchmark + + - name: Compress CLI binary + if: startsWith(github.ref, 'refs/tags/v') + run: | + cp target/release/tree-sitter . + gzip --keep --suffix "-${{ runner.os }}-x64.gz" tree-sitter + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/v') + with: + draft: true + files: | + tree-sitter-*.gz + lib/binding_web/tree-sitter.js + lib/binding_web/tree-sitter.wasm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}