-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (66 loc) · 1.96 KB
/
main.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build
on: [push, pull_request, release]
permissions:
contents: write
id-token: write
pages: write
jobs:
test:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-20.04, windows-2019, macOS-11]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: '3.12'
- name : Install Requirements
run : |
pip install ".[ci]"
- name: Run Tests
run: make test
# - name: Build Docs [Main Branch Only]
# if: github.ref == 'refs/heads/main'
# run: |
# pip install quartodoc
# quartodoc build
# - name: Set up Quarto [Main Branch Only]
# uses: quarto-dev/quarto-actions/setup@v2
# if: github.ref == 'refs/heads/main'
# - name: Publish to GitHub Pages [Main Branch Only]
# uses: quarto-dev/quarto-actions/publish@v2
# if: github.ref == 'refs/heads/main'
# with:
# target: gh-pages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
name: Create Github/Pypi Release
needs:
- test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5.0.0
with:
python-version: '3.12'
- name : Build library wheel
run : pip wheel --no-deps -w dist .
- name: Publish to Github Releases
uses: softprops/action-gh-release@v1
- name: Publish to Pypi
run: |
pip install twine
twine upload ./dist/* --verbose
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl