chore: Release #7
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-24.04-arm | |
| - target: x86_64-apple-darwin | |
| runner: macos-14 | |
| - target: aarch64-apple-darwin | |
| runner: macos-14 | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install tree-sitter CLI | |
| run: npm install -g tree-sitter-cli | |
| - name: Build frontend | |
| working-directory: tcode-web/frontend | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} --features tcode/bundled-frontend | |
| - name: Package | |
| run: | | |
| TAG="${{ github.ref_name }}" | |
| TARGET="${{ matrix.target }}" | |
| if [ "${{ runner.os }}" = "macOS" ]; then | |
| LIB_EXT="dylib" | |
| else | |
| LIB_EXT="so" | |
| fi | |
| tar -czf "tcode-${TAG}-${TARGET}.tar.gz" \ | |
| -C "target/${TARGET}/release" \ | |
| tcode \ | |
| browser-server \ | |
| "libtree-sitter-tcode.${LIB_EXT}" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.target }} | |
| path: tcode-*.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: tcode-*.tar.gz | |
| generate_release_notes: true |