diff --git a/.github/workflows/update-fig-spec.yml b/.github/workflows/update-fig-spec.yml new file mode 100644 index 000000000..69e905609 --- /dev/null +++ b/.github/workflows/update-fig-spec.yml @@ -0,0 +1,29 @@ +name: Update Fig Spec +on: + push: + tags: + - "v*" + +env: + go-version: 1.18.x +jobs: + update-fig-spec: + name: Update Fig Spec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Go ${{ env.go-version }} + uses: actions/setup-go@v3 + with: + go-version: ${{ env.go-version }} + - name: Generate the spec + run: | + make build-core + ./dtm completion fig > dtm.ts + - name: Create Autocomplete PR + uses: withfig/push-to-fig-autocomplete-action@v1 + with: + token: ${{ secrets.FIG_TOKEN }} + autocomplete-spec-name: dtm + spec-path: dtm.ts + integration: cobra