generated from CCA-Software-Group/py_template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 1.12 KB
/
package.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
name: build and release to PyPI
on:
release:
types:
- released
jobs:
deploy:
runs-on: ubuntu-20.04
if: (github.repository == 'astropy/repo_stats')
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools wheel twine
pip install pep517 --user
- name: Install package
run: |
pip install .
- name: Build binary wheel and source tarball
run: |
python -m pep517.build --source --binary --out-dir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0
with:
user: __token__
password: ${{ secrets.pypi_password }}