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

Add build wf #26

Merged
merged 4 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
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
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build
on:
push:
branches: [main]
paths:
- "**.py"
- '.openapi/**'
pull_request:
branches: [main]
paths:
- "**.py"
- 'openapi/**'
- '.github/**'

jobs:
build:
name: Poetry Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install Python Poetry
run: make install-setup
- name: Build Python modules
run: make build
5 changes: 4 additions & 1 deletion .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
**/.travis.yml
**/api
**/.openapi-generator-ignore
**/.gitlab-ci.yml
**/.gitlab-ci.yml
**/setup.cfg
**/setup.py
**/requirements.txt
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ifeq (, $(shell which python3 2> /dev/null))
exit 1
endif
ifeq (, $(shell which poetry 2> /dev/null))
@curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
@curl -sSL https://install.python-poetry.org | python -
endif

.PHONY: build
Expand All @@ -22,4 +22,16 @@ build: install-setup

.PHONY: publish
publish: install-setup
@twine upload dist/*
@twine upload dist/*

# The staggered make target explanations are printed correctly (not staggered) to the console.
.PHONY: help
help:
@echo "App servces Python SDK make targets"
@echo ""
@echo "make generate Uses OpenAPI Generator to generate the SDK"
@echo "make generate-errors Generate the SDK errors"
@echo "make install-setup Installs poetry"
@echo "make build Build the SDK"
@echo "make publish Publish the SDK"
@echo "make help Print this help"