Skip to content

Commit

Permalink
Extend job to upload schema artifact to release
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed May 7, 2022
1 parent 4f51ec4 commit 116c4c7
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Generate OpenAPI
on:
release:
types: [published]

jobs:
openapi:
runs-on: ubuntu-latest
env:
DEBUG: True
SECRET_KEY: changeme!
ALLOWED_HOSTS: localhost,127.0.0.1
DATABASE_URL: sqlite:////tmp/db.sqlite3
CORS_ORIGIN_WHITELIST: "http://localhost,http://127.0.0.1"
REGISTER_VERIFICATION_URL: "http://localhost:4200/verify-user/"
RESET_PASSWORD_VERIFICATION_URL: "http://localhost:4200/reset-password/"
REGISTER_EMAIL_VERIFICATION_URL: "http://localhost:4200/verify-email/"

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate OpenAPI
run: python manage.py spectacular --file schema.yml
working-directory: snypy

- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: ./snypy/schema.yml text/yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 116c4c7

Please sign in to comment.