Skip to content

Commit

Permalink
chore: publish on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi committed Aug 15, 2023
1 parent 1cd7bdb commit 444d117
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,27 @@ jobs:
# Actually create the tag and upload the atlas script
npx [email protected]
# Release to PyPi
- name: Install dependencies
run: pip install pip

- name: Install Dependencies
run: pip install setuptools wheel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Update the tag version in setup.py
if: env.NEXT_VERSION
run: |
NEXT_VERSION_PYPI=${NEXT_VERSION:1} # Remove the leading 'v' to match PyPi's versioning scheme
sed -i -e "s/version=.*,/version='$NEXT_VERSION_PYPI' # tagged by release.yml,/" setup.py
cat setup.py
- name: Publish to PyPi
if: env.NEXT_VERSION
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
3 changes: 3 additions & 0 deletions openedx_atlas/__ini__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Dummy package only to ensure `pip install` works on this package.
"""
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python

import os

from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

setup(
name='openedx-atlas',
version='0.0.dev1',
description='An Open edX CLI tool for moving translation files from openedx-translations.',
long_description=README,
author='Open edX project',
author_email='[email protected]',
url='https://github.com/openedx/openedx-atlas',
packages=['openedx_atlas'],
scripts=['atlas'],
license='AGPL 3.0',
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
],
)

0 comments on commit 444d117

Please sign in to comment.