Skip to content

Commit

Permalink
Publish 1.0 to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdhasjg committed Nov 15, 2023
1 parent b212915 commit b036318
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to PyPI

on:
push:
tags:
- '*'

concurrency: publish

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish to PyPI
run: |
python setup.py sdist bdist_wheel
python -m twine upload --repository testpypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
19 changes: 15 additions & 4 deletions .github/workflows/tagging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Tagging
name: Auto Tagging

on:
workflow_dispatch:
push:
branches:
- "main"
Expand Down Expand Up @@ -31,9 +32,19 @@ jobs:
- name: Get package information
id: package_info
run: |
echo "version=$(./setup.py --version)" >> "$GITHUB_OUTPUT"
current_version=$(./setup.py --version)
tag_exist=false
if git rev-parse "refs/tags/$current_version" >/dev/null 2>&1; then
echo "::warning title=Tag already exists::${current_version}"
tag_exist=true
fi
echo "version=${current_version}" >> "$GITHUB_OUTPUT"
echo "tag_exist=${tag_exist}" >> "$GITHUB_OUTPUT"
- name: Add git tag
if: ${{ steps.package_info.outputs.tag_exist == 'false' }}
run: |
git tag ${{ steps.package_info.outputs.version }} -f
git push origin ${{ steps.package_info.outputs.version }} -f
git tag ${{ steps.package_info.outputs.version }}
git push origin ${{ steps.package_info.outputs.version }}
2 changes: 1 addition & 1 deletion aws_fusion/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5'
__version__ = '1.0'
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class CustomInstallScriptsCommand(install_scripts):
'aws-auth'
],
long_description=read("README.md"),
long_description_content_type='text/markdown',
packages=find_packages(),
cmdclass={
'develop': CustomDevelopCommand,
Expand Down

0 comments on commit b036318

Please sign in to comment.