github.com/livekit/protocol@v1.39.3/.github/workflows/release.yaml (about)

     1  name: Release
     2  
     3  on:
     4    push:
     5      branches:
     6        - main
     7  
     8  concurrency: ${{ github.workflow }}-${{ github.ref }}
     9  
    10  jobs:
    11    release:
    12      name: Release
    13      runs-on: ubuntu-latest
    14      steps:
    15        - uses: actions/checkout@v4
    16  
    17        - name: Install Protoc
    18          uses: arduino/setup-protoc@v2
    19          with:
    20            repo-token: ${{ secrets.GITHUB_TOKEN }}
    21  
    22        - uses: pnpm/action-setup@v4
    23  
    24        - name: Use Node.js 20
    25          uses: actions/setup-node@v4
    26          with:
    27            node-version: 20
    28            cache: "pnpm"
    29  
    30        - name: Install dependencies
    31          run: pnpm install
    32  
    33        - name: Create Release Pull Request or Publish packages
    34          id: changesets
    35          uses: changesets/action@v1
    36          with:
    37            # This expects you to have a script called ci:publish which does a build for your packages and calls changeset publish
    38            publish: pnpm ci:publish
    39          env:
    40            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    41            NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
    42  
    43        - name: Create git tag for golang package
    44          if: steps.changesets.outputs.published == 'true'
    45          uses: rickstaa/action-create-tag@v1
    46          id: tag_create
    47          with:
    48            tag: ${{format('v{0}', fromJson(steps.changesets.outputs.publishedPackages)[0].version)}}
    49            tag_exists_error: false
    50            message: "github.com/livekit/protocol@${{fromJson(steps.changesets.outputs.publishedPackages)[0].version}}"