summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/sync-zed-extension.yml
blob: f14487cde9745858178845581a088a7d95a2a865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: "sync-zed-extension"

on:
  workflow_dispatch:
  release:
    types: [published]

jobs:
  zed:
    name: Release Zed Extension
    runs-on: blacksmith-4vcpu-ubuntu-2404
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: ./.github/actions/setup-bun

      - name: Get version tag
        id: get_tag
        run: |
          if [ "${{ github.event_name }}" = "release" ]; then
            TAG="${{ github.event.release.tag_name }}"
          else
            TAG=$(git tag --list 'v[0-9]*.*' --sort=-version:refname | head -n 1)
          fi
          echo "tag=${TAG}" >> $GITHUB_OUTPUT
          echo "Using tag: ${TAG}"

      - name: Sync Zed extension
        run: |
          ./script/sync-zed.ts ${{ steps.get_tag.outputs.tag }}
        env:
          ZED_EXTENSIONS_PAT: ${{ secrets.ZED_EXTENSIONS_PAT }}
          ZED_PR_PAT: ${{ secrets.ZED_PR_PAT }}