Skip to content

chore: release v0.1.8 #9

chore: release v0.1.8

chore: release v0.1.8 #9

Workflow file for this run

name: Release codetime-ls
# Tag a release (e.g. `git tag v0.1.0 && git push --tags`) to build the language
# server for every platform the Zed extension downloads, and attach the
# `codetime-ls-<target-triple>.zip` assets the extension looks for.
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cross: false
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
cross: true
- os: macos-latest
target: x86_64-apple-darwin
cross: false
- os: macos-latest
target: aarch64-apple-darwin
cross: false
- os: windows-latest
target: x86_64-pc-windows-msvc
cross: false
# Native ARM64 runner: cross-compiling the TLS backend from x64
# Windows is brittle, so build aarch64-windows on real hardware.
- os: windows-11-arm
target: aarch64-pc-windows-msvc
cross: false
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
if: matrix.cross
run: cargo install cross --locked
- name: Build
shell: bash
run: |
if [ "${{ matrix.cross }}" = "true" ]; then
cross build --manifest-path codetime-ls/Cargo.toml --release --target ${{ matrix.target }}
else
cargo build --manifest-path codetime-ls/Cargo.toml --release --target ${{ matrix.target }}
fi
- name: Package
shell: bash
run: |
bin=codetime-ls
ext=""
if [[ "${{ matrix.target }}" == *windows* ]]; then ext=".exe"; fi
src="codetime-ls/target/${{ matrix.target }}/release/${bin}${ext}"
out="codetime-ls-${{ matrix.target }}.zip"
# Stage in a separate dir. The repo already has a `codetime-ls/`
# source dir, so copying the binary to ./codetime-ls would land it
# *inside* that dir and the archive would capture the whole source
# tree (the extension then tries to exec a directory -> EACCES).
mkdir -p dist
cp "$src" "dist/${bin}${ext}"
(
cd dist
if [[ "${{ matrix.target }}" == *windows* ]]; then
# Windows ignores the executable bit; 7z is always on the runner.
7z a "../$out" "${bin}${ext}"
else
# Unix: keep +x and use Info-ZIP `zip`, which records the mode so
# the extracted binary stays executable.
chmod +x "${bin}${ext}"
zip "../$out" "${bin}${ext}"
fi
)
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: codetime-ls-${{ matrix.target }}.zip