Skip to content

Publish to fig autocomplete #75

Publish to fig autocomplete

Publish to fig autocomplete #75

name: Publish to fig autocomplete
on:
workflow_call:
workflow_dispatch:
jobs:
push-to-fig-autocomplete:
runs-on: pub-hk-ubuntu-22.04-small
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install Fig Oclif Plugin
run: cd packages/cli && yarn add @fig/complete-oclif && jq '.oclif.plugins += ["@fig/complete-oclif"]' package.json > temp.json && mv temp.json package.json
- run: yarn --immutable --network-timeout 1000000
- name: Build Heroku CLI
run: yarn build
- name: Generate Fig Spec
run: cd packages/cli && ./bin/run generate-fig-spec > spec.ts
- name: Get Heroku Version
id: cli-version
run: version=$(heroku version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+')
- name: Create Fig Autocomplete PR
run: ${{ steps.cli-version.outputs.version }}
# uses: withfig/push-to-fig-autocomplete-action@v2
# with:
# token: ${{ secrets.HEROKU_CLI_BOT_TOKEN }}
# autocomplete-spec-name: 'heroku'
# spec-path: ./packages/cli/spec.ts
# integration: oclif
# diff-based-versioning: true
# new-spec-version: ${{ steps.cli-version.outputs.version }}
# pr-body: Automated PR for latest Heroku CLI release