-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (37 loc) · 1.01 KB
/
pypi.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
name: Publish to PyPI
on:
push:
branches:
- main
paths:
- "version"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install build package
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Get version from file
run: |
VER=$(cat version)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Install locally to test
run: python -m pip install ./dist/eitaa-${{ env.VERSION }}.tar.gz
# - name: Run unit test
# run: python ./test/test_eitaa.py
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
- name: Install Pacakage from pypi
run: python -m pip install eitaa