-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.32 KB
/
openapi.yml
File metadata and controls
59 lines (49 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Openapi CI
on:
push:
tags:
- '*'
jobs:
install-and-run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
if: ${{ !matrix.deploy }}
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Make openapi.json
run: |
python src/diffcalc_api/openapi.py
- name: Upload
uses: actions/upload-artifact@v3
with:
name: openapi.json
path: openapi.json
- name: Delete json after upload
run: rm openapi.json
release:
needs: [install-and-run-script]
runs-on: ubuntu-latest
# upload to PyPI and make a release on every tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v3
with:
name: openapi.json
path: openapi/
- name: Github Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
files: openapi/openapi.json
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}