This repository was archived by the owner on Jan 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (68 loc) · 2.24 KB
/
test_n_pub.yml
File metadata and controls
83 lines (68 loc) · 2.24 KB
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
82
83
name: Run Tests
on:
push:
tags:
- "v*.*.*"
pull_request:
workflow_dispatch:
jobs:
tests:
name: Python ${{ matrix.python-version }} • ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- run: echo ${{github.ref}}
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Setup Python dependencies
run: |
python -m pip install -U pip setuptools wheel
pip install -r requirements.txt
- name: Install ffmpegio-plugin-downloader package
run: |
pip install -q .
pip list
- name: Run tests
run: pytest -vv
distribute:
name: Distribution
runs-on: ubuntu-latest
needs: tests
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Setup Python dependencies
run: |
python -m pip install -U pip setuptools wheel build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: add python distribution files to release
uses: softprops/action-gh-release@v1
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
- name: Publish distribution 📦 to PyPI
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
if: env.PYPI_API_TOKEN != null
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}