Provision of OpenAPI and AsyncAPI specifications in multiple versions #319
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: Merge async api specification | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| name: Run swagger-merger | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the repository | |
| - uses: actions/checkout@v4 | |
| # install swagger-merger | |
| - name: install swagger-merger | |
| run: npm install -g swagger-merger | |
| # Run swagger-merger | |
| - name: Run swagger-merger | |
| run: | | |
| swagger-merger -i MQTT_for_IO-Link_unmerged.yaml schemas.yaml examples.yaml -o MQTT_for_IO-Link.yaml | |
| swagger-merger -i JSON_for_IO-Link_unmerged.yaml schemas.yaml examples.yaml -o JSON_for_IO-Link.yaml | |
| - name: Upload merged MQTT_for_IO-Link YAML file as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mqtt-yaml | |
| path: MQTT_for_IO-Link.yaml | |
| - name: Upload merged JSON_for_IO-Link YAML file as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: json-yaml | |
| path: JSON_for_IO-Link.yaml | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| files: | | |
| JSON_for_IO-Link.yaml | |
| MQTT_for_IO-Link.yaml | |
| LICENSE | |
| body_path: ${{ github.workspace }}/changelog.md | |
| draft: true | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |