-
Notifications
You must be signed in to change notification settings - Fork 49
81 lines (78 loc) · 2.21 KB
/
release.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release
on:
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
release-docs:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on:
- ubuntu-22.04
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7.15'
cache: 'pip'
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Jekyll Site
run: |
sudo chown -R runneradmin:runneradmin docs
task docsCompile
sudo chown -R runner:docker docs
- name: Generate Python Docs
run: |
task pyDocs
mkdir -p docs/_site/docs
mv client-python/pdoc/elastiknn docs/_site/docs/pdoc
- name: Configure Pages
uses: actions/configure-pages@v2
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
release:
runs-on:
- ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed for git-based changelog.
- uses: actions/setup-python@v4
with:
python-version: '3.7.15'
cache: 'pip'
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 19
cache: 'sbt'
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pypirc file
env:
TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc
- name: Setup Setuptools
run: python3 -m pip install setuptools
- name: Publish to PyPi
run: task pyPublishRelease
- name: Publish to Github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: task jvmPublishRelease