-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (45 loc) · 1.41 KB
/
package.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
name: es2loki python package
on: [push]
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: ['3.9', '3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build poetry
poetry export --with=lint -f requirements.txt | python -m pip install -r /dev/stdin
- name: Run tests
run: |
make lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
build:
runs-on: ubuntu-latest
needs:
- test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build poetry
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: ${{ secrets.TWINE_USERNAME }}
password: ${{ secrets.TWINE_PASSWORD }}