add configuration for pypi release
This commit is contained in:
53
.github/workflows/release.yml
vendored
Normal file
53
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Release
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build-items:
|
||||
description: 'Items to be build'
|
||||
required: true
|
||||
default: 'all'
|
||||
type: choice
|
||||
options:
|
||||
- all
|
||||
- windows
|
||||
- linux
|
||||
- mac
|
||||
|
||||
jobs:
|
||||
build-ubuntu-latest:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all", "linux"]'), github.event.inputs.build-items)) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
pip install -r requirements.txt
|
||||
- name: Build PyPI package
|
||||
run: |
|
||||
python3 -m build
|
||||
- name: Upload to PyPI
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
||||
skip-existing: true
|
||||
- name: Archive distribution
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-dist
|
||||
path: |
|
||||
genx/dist/*.tar.gz
|
||||
6
pyproject.toml
Normal file
6
pyproject.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"wheel"
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
31
setup.cfg
Normal file
31
setup.cfg
Normal file
@@ -0,0 +1,31 @@
|
||||
[bdist_wheel]
|
||||
universal = 1
|
||||
|
||||
[metadata]
|
||||
name = amor_eos
|
||||
version = attr: libeos.__version__
|
||||
author = Jochen Stahn - Paul Scherrer Institut
|
||||
author_email = jochen.stahn@psi.ch
|
||||
description = EOS reflectometry reduction for AMOR instrument
|
||||
license = MIT
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
License :: OSI Approved :: MIT License
|
||||
Operating System :: OS Independent
|
||||
Topic :: Scientific/Engineering
|
||||
Development Status :: 5 - Production/Stable
|
||||
|
||||
[options]
|
||||
python_requires = >=3.8
|
||||
packages =
|
||||
libeos
|
||||
scripts =
|
||||
eos.py
|
||||
install_requires =
|
||||
numpy
|
||||
h5py
|
||||
orsopy
|
||||
numba
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/jochenstahn/amor"
|
||||
Reference in New Issue
Block a user