forked from STOCD/OSCR-server
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.1 KB
/
swagger.yaml
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
name: Generate Artifacts
on: push
jobs:
build_binary:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: pip install -r requirements.txt
- run: ENABLE_DEBUG=yes python3 OSCR_django/manage.py migrate
- run: mkdir -p dist
- run: ENABLE_DEBUG=yes python3 OSCR_django/manage.py generate_swagger -f yaml -u http://127.0.0.1 dist/OSCR_django.yaml
- uses: actions/upload-artifact@v2
with:
name: build_binary
path: dist/*
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [ build_binary ]
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: build_binary
path: dist
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: dist/*