livekit-protocol 0.8.3

Livekit protocol and utilities for the Rust SDK
Documentation
name: Release

on:
  push:
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  id-token: write # Required for OIDC
  contents: write # Required to create GH releases
  pull-requests: write # Required to interact with PRs

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      # The published JS package is generated at build time by pnpm generate:proto, so
      # protoc is a release input. Keep it on the same release as generate.yaml, or the
      # published package is generated by a different compiler than the committed Go code.
      - name: Install Protoc
        uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
        with:
          version: "35.1"
          repo-token: ${{ secrets.GITHUB_TOKEN }}

      - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0

      - name: Use Node.js 20
        uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
        with:
          node-version: 24
          cache: "pnpm"

      - name: Install dependencies
        run: pnpm install

      - name: Create Release Pull Request or Publish packages
        id: changesets
        # v2 is the release line for @changesets/cli v3. v1 detects published packages by parsing
        # `changeset publish` stdout for "New tag:", which CLI v3 no longer prints, so `published`
        # stays false and the Go tag below is never created.
        uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
        with:
          # This expects you to have a script called ci:publish which does a build for your packages and calls changeset publish
          publish-script: pnpm ci:publish

      - name: Create git tag for golang package
        if: steps.changesets.outputs.published == 'true'
        uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2
        id: tag_create
        with:
          tag: ${{format('v{0}', fromJson(steps.changesets.outputs['published-packages'])[0].version)}}
          tag_exists_error: false
          message: "github.com/livekit/protocol@${{fromJson(steps.changesets.outputs['published-packages'])[0].version}}"