github.com/livekit/protocol@v1.16.1-0.20240517185851-47e4c6bba773/.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@v2
    23          with:
    24            version: 8
    25  
    26        - name: Use Node.js 20
    27          uses: actions/setup-node@v4
    28          with:
    29            node-version: 20
    30            cache: "pnpm"
    31  
    32        - name: Install dependencies
    33          run: pnpm install
    34  
    35        - name: Create Release Pull Request or Publish packages
    36          id: changesets
    37          uses: changesets/action@v1
    38          with:
    39            # This expects you to have a script called ci:publish which does a build for your packages and calls changeset publish
    40            publish: pnpm ci:publish
    41          env:
    42            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    43            NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
    44  
    45        - name: Create git tag for golang package
    46          if: steps.changesets.outputs.published == 'true'
    47          uses: rickstaa/action-create-tag@v1
    48          id: tag_create
    49          with:
    50            tag: ${{format('v{0}', fromJson(steps.changesets.outputs.publishedPackages)[0].version)}}
    51            tag_exists_error: false
    52            message: "github.com/livekit/protocol@${{fromJson(steps.changesets.outputs.publishedPackages)[0].version}}"