Skip to content

Commit

Permalink
Merge pull request #18 from scipion-em/devel
Browse files Browse the repository at this point in the history
Release devel upon pushing to master
  • Loading branch information
rmarabini committed Sep 24, 2020
2 parents ea5cb4f + e3c6844 commit 096a521
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish_and_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Workflow to send master to pypi and tag the branch:
# You need to edit FOLDER_WITH_VERSION with the folder that has the __version__ value.

name: master to pypi with comments and tag


# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]

env:
FOLDER_WITH_VERSION: phenix
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install scipion-pyworkflow
pip install scipion-em
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/* -c "${{ secrets.PYPI_COMMENT }}"
- name: Get version and tag
run: |
export PACKAGE_VERSION=$(python -c "import $FOLDER_WITH_VERSION; print('VERSION', 'v'+$FOLDER_WITH_VERSION.__version__)" | grep VERSION | sed "s/VERSION //g")
git tag $PACKAGE_VERSION
git push origin $PACKAGE_VERSION
1 change: 1 addition & 0 deletions phenix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

_logo = "phenix.png"
_references = ['Adams_2010']
__version__ = "3.0.1"


class Plugin(pwem.Plugin):
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# To use a consistent encoding
from codecs import open
from os import path
from phenix import __version__

here = path.abspath(path.dirname(__file__))

Expand Down Expand Up @@ -42,13 +43,13 @@
#
# For a discussion on single-sourcing the version across setup.py and the
# project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='3.0.0', # Required
# https:deve//packaging.python.org/en/latest/single_source_version.html
version=__version__, # Required

# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
# https://packaging.python.org/specifications/core-metadata/#summary
description='PHENIX programs in Scipion. Warning: Install PHENIX v. 1-13-2998 or 1-16-3549', # Required
description='PHENIX programs in Scipion. Warning: Install PHENIX v. 1-17', # Required

# This is an optional longer description of your project that represents
# the body of text which users will see when they visit PyPI.
Expand Down

0 comments on commit 096a521

Please sign in to comment.