removed addOauth command #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Macrobond API | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| PACKAGE_NAME: macrobond | |
| OPENAPI_SPEC: https://api.macrobondfinancial.com/swagger/v1/swagger.json | |
| jobs: | |
| process-yaml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'current-repo' | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'mathworks-ref-arch/matlab-openapi-generator' | |
| path: 'external-repo' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' # Specify the Node.js version you want to use | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '11' | |
| cache: 'maven' | |
| - name: Run Maven Package | |
| run: | | |
| cd external-repo/Software/Java | |
| mvn -q clean package | |
| - name: Generate API | |
| run: | | |
| cd external-repo/Software | |
| npx @openapitools/openapi-generator-cli --custom-generator MATLAB/lib/jar/MATLABClientCodegen-openapi-generator-0.0.1.jar generate -g MATLAB -i ${{ env.OPENAPI_SPEC }} -o macrobond --package-name ${{ env.PACKAGE_NAME }} | |
| - name: Configure Git | |
| run: | | |
| cp -r external-repo/Software/macrobond current-repo/AutogeneratedAPI/ | |
| cd current-repo | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Commit and Push changes | |
| run: | | |
| cd current-repo | |
| git add . | |
| git commit -m "Update generated MATLAB API" | |
| git push origin main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |