-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (85 loc) · 2.36 KB
/
pypi.yml
File metadata and controls
95 lines (85 loc) · 2.36 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
84
85
86
87
88
89
90
91
92
93
94
95
name: Build
on:
push:
jobs:
build_wheel:
name: Build Python 3 wheel
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.10']
include:
- os: ubuntu-20.04
arch: "x86_64"
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Build wheel
run: |
python -m pip install build
python -m build --wheel .
- name: Save sdist
uses: actions/upload-artifact@v4
with:
name: artifact
path: dist/*.whl
if-no-files-found: error
upload_pypi_test:
name: Upload to PyPI test
needs: [build_wheel]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://test.pypi.org/p/interbasepython
permissions:
id-token: write
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
upload_pypi:
name: Upload to PyPI
needs: [build_wheel]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/interbasepython
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
upload_gh_pages:
name: Deploy to GitHub Pages
needs: [upload_pypi]
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/
force_orphan: true