Skip to content

Commit

Permalink
Added Python package setup and version management
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoveda committed Jun 19, 2020
1 parent 1b312bf commit c8a136b
Show file tree
Hide file tree
Showing 8 changed files with 2,440 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
artella/plugins/savetocloud/_version.py export-subst
33 changes: 33 additions & 0 deletions .github/workflows/pythonrelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
tags:
- "releases/[1-9]+.[0-9]+.[0-9]+!"
branches:
- "master"
create:
tags:
- "releases/[1-9]+.[0-9]+.[0-9]+!"
branches:
- "master"

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
if: startsWith( github.ref, 'refs/tags/releases/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ github.event.commits[0].message }}
draft: false
prerelease: false
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include versioneer.py
include artella-plugin.json
include artella/plugins/savetocloud/_version.py
recursive-include artella/plugins/savetocloud/resources/* *.*
recursive-exclude * *.py[co]
22 changes: 22 additions & 0 deletions artella/plugins/savetocloud/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

"""
Version module for artella-plugins-savetocloud
"""

from __future__ import print_function, division, absolute_import

__version__ = None


def get_version():
global __version__
if __version__:
return __version__

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

return __version__
Loading

0 comments on commit c8a136b

Please sign in to comment.