-
Notifications
You must be signed in to change notification settings - Fork 58
84 lines (79 loc) · 2.26 KB
/
pypi_test.yaml
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
name: Create and publish pypi image
on:
push:
# branches:
# - develop
# - main
# tags:
# - 'v*'
# env:
# REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.8]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64
- name: Pre-Install dependencies
run: |
gfortran --version
export QT_QPA_PLATFORM='offscreen'
sudo apt install libeigen3-dev
git submodule init
git submodule update
# git fetch --tags -f
# mkdir build && cd build
# cmake .. && make install -j 4 && cd ..
# pip install -e .
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
# run: python3 setup.py sdist
run: python3 -m pip install --user --cache-dir dist/ -e .
# run: python setup.py bdist_wheel --universal
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/icl_sharpy # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# with:
# path: dist/*