Skip to content

Commit 85af0e1

Browse files
committed
try github action for publish
1 parent a0deac7 commit 85af0e1

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
# See also https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
4+
5+
name: Upload Python Package
6+
7+
on:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
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: Generate library
26+
run: |
27+
bash helper.sh generate
28+
- name: Build
29+
run: |
30+
bash helper.sh build
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packageName": "elabapi_python",
33
"projectName": "elabapi-python",
4-
"packageVersion": "0.1.1",
4+
"packageVersion": "0.1.2",
55
"packageUrl": "https://github.com/elabftw/elabapi-python"
66
}

0 commit comments

Comments
 (0)