-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (58 loc) · 2.12 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Auto CI
on:
workflow_dispatch:
jobs:
build-py:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.11']
os-version: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
- name: Download PyGWalkerApp
uses: actions/download-artifact@v3
id: build-py
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version == '3.7' && matrix.os-version == 'macos-latest' && '3.7.16' || matrix.python-version }}
- name: Download wasm-pack
working-directory: ./
run: |
chmod 744 ./scripts/download_wasm.py
python ./scripts/download_wasm.py
- name: Try Installing
working-directory: ./
run: |
pip install ./
- name: Try Pytest
working-directory: ./
run: |
pip install pytest
pytest tests
- name: Try building
working-directory: ./
run: |
pip install build twine
python -m build .
- name: Uploading PyPI
if: ${{ matrix.python-version == '3.11' && matrix.os-version == 'ubuntu-latest' }}
uses: pypa/[email protected]
with:
# PyPI user
# Password for your PyPI user or an access token
password: ${{ secrets.PYPI_TOKEN }}
# The target directory for distribution
packages-dir: dist
# Check metadata before uploading
verify-metadata: true
# Do not fail if a Python package distribution exists in the target package index
skip-existing: true
# Show verbose output.
verbose: true
# Show hash values of files to be uploaded
print-hash: true