Skip to content

Commit

Permalink
feat(workflow): add fig autocomplete workflow (#2666)
Browse files Browse the repository at this point in the history
* Add workflow from forked PR to correct directory

* Clean up & update fig workflow

* Calls publish-to-fig-autocomplete workflow

During post release job
  • Loading branch information
zwhitfield3 authored Mar 1, 2024
1 parent c062c59 commit 7105fb6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/promote-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
sudo apt-get install -y awscli
aws configure set preview.cloudfront true
- run: ./scripts/postrelease/invalidate_cdn_cache
## Calls publish-to-fig-autocomplete workflow during post release jobs
- uses: ./.github/workflows/publish-to-fig-autocomplete.yml

release-homebrew:
needs: [ invalidate-cdn-cache ]
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish-to-fig-autocomplete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to fig autocomplete

on:
workflow_call:
workflow_dispatch:

jobs:
push-to-fig-autocomplete:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- run: yarn --immutable --network-timeout 1000000
- name: Install Fig Oclif Plugin
run: ./bin/run plugins:install @fig/oclif-complete@2
- name: Generate Fig Spec
run: ./bin/run generate-fig-spec > spec.ts
- name: Get heroku version
id: cli-version
run: echo "version=$(./bin/run --version | sed -rn 's/^heroku\/([0-9\.]+).*$/\1/p')"
- name: Create Fig Autocomplete PR
uses: withfig/push-to-fig-autocomplete-action@v1
with:
token: ${{ secrets.HEROKU_CLI_BOT_TOKEN }}
autocomplete-spec-name: 'heroku'
spec-path: spec.ts
integration: oclif
diff-based-versioning: true
new-spec-version: ${{ steps.cli-version.outputs.version }}

0 comments on commit 7105fb6

Please sign in to comment.