Skip to content

Commit ecbf7b4

Browse files
committed
Add github action for publishing to pypi and bumpbversion
1 parent 8c912c1 commit ecbf7b4

3 files changed

Lines changed: 62 additions & 1 deletion

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
python -m twine upload dist/*

publish_conda.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# set -ex
4+
set -o pipefail
5+
6+
VERSION=2019.1
7+
URL=https://github.com/finsberg/ldrb/archive/v${VERSION}.tar.gz
8+
9+
go_to_build_dir() {
10+
if [ ! -z $INPUT_SUBDIR ]; then
11+
cd $INPUT_SUBDIR
12+
fi
13+
}
14+
15+
get_shasum(){
16+
# wget -O- $URL | shasum -a 256
17+
curl $URL -O| openssl sha256
18+
rm v${VERSION}.tar.gz
19+
}
20+
21+
22+
upload_package(){
23+
conda config --set anaconda_upload yes
24+
anaconda login --username $ANACONDA_USERNAME --password $ANACONDA_PASSWORD
25+
conda build .
26+
anaconda logout
27+
}
28+
29+
upload_package
30+
# get_shasum

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
URL = "https://github.com/finsberg/ldrb"
2121
2222
AUTHOR = "Henrik Finsberg"
23-
VERSION = "2019.0"
23+
VERSION = "2019.1"
2424

2525
# What packages are required for this module to be executed?
2626
REQUIRED = ["h5py", "numba", "numpy-quaternion"]

0 commit comments

Comments
 (0)