Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add publish-to-fig-autocomplete.yml action #2581

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-fig-autocomplete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to fig autocomplete

on:
workflow_call:
workflow_dispatch:
input:
notUsed:
type: string
description: Run this workflow from a "release-*" branch. This input does nothing.
required: false

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')" >> $GITHUB_OUTPUT
- name: Create Fig Autocomplete PR
uses: withfig/push-to-fig-autocomplete-action@v1
with:
token: ${{ secrets.BOT_TOKEN }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a github bot account to make PRs to the https://github.com/withfig/autocomplete repo

autocomplete-spec-name: 'heroku'
spec-path: spec.ts
integration: oclif
diff-based-versioning: true
new-spec-version: ${{ steps.cli-version.outputs.version }}