Skip to content

🐛 New features fix #58

🐛 New features fix

🐛 New features fix #58

Workflow file for this run

name: Generate SDKs using liblab
on:
push:
paths:
- "packages/api/swagger/swagger-spec.json"
# Add any other triggers you want here, such as a push to the spec file
workflow_call:
workflow_dispatch:
jobs:
build-and-pr:
name: Generate SDKs and create PRs
runs-on: ubuntu-latest
if: github.run_number != 1
env:
LIBLAB_CI: true
LIBLAB_TOKEN: ${{ secrets.LIBLAB_TOKEN }}
LIBLAB_GITHUB_TOKEN: ${{ secrets.LIBLAB_GITHUB_TOKEN }}
steps:
- name: Check if secrets are set
run: |
if [[ -n "${{ secrets.LIBLAB_TOKEN }}" && -n "${{ secrets.LIBLAB_GITHUB_TOKEN }}" ]]; then
echo "Secrets are set, proceeding with the workflow"
else
echo "Error: Secrets LIBLAB_TOKEN and LIBLAB_GITHUB_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-github-actions/#create-tokens"
echo "::error::Secrets LIBLAB_TOKEN and LIBLAB_GITHUB_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-github-actions/#create-tokens"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install liblab
run: npm install -g liblab
working-directory: packages/api
- name: Start Build
run: liblab build --yes
working-directory: packages/api
- name: Create PRs to GitHub repos
run: liblab pr
working-directory: packages/api