-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (42 loc) · 1.14 KB
/
publish.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
name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Verify vulnerabilities with Maven
working-directory: java
run: mvn verify
- name: Package with Maven
working-directory: java
run: mvn package
- name: Create dist
working-directory: ./python
run: |
python -m pip install --upgrade pip build
pip install .
python -m build
- name: Generate GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "./python/dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: python/dist