diff --git a/.github/workflows/generate-api-client.yml b/.github/workflows/generate-api-client.yml new file mode 100644 index 0000000..ec97ade --- /dev/null +++ b/.github/workflows/generate-api-client.yml @@ -0,0 +1,29 @@ +name: Generate API Client + +on: + push: + branches: + - main + +jobs: + generate-api-client: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Install Dependencies + run: npm install + + - name: Generate API Client + run: npx @openapitools/openapi-generator-cli generate -i swagger.json -g typescipt-fetch -o ./api-client + + - name: Commit Generated Code + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add ./api-client + git commit -m "Update generated API client" + git push +