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 45bab4a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 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:
release:
types:
- created

concurrency: publish

jobs:
build:
runs-on: ubuntu-latest
environment: pypi
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 dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.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/v$current_version" >/dev/null 2>&1; then
echo "::warning title=Tag already exists::v${current_version}"
tag_exist=true
fi
echo "tag=v${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.tag }}
git push origin ${{ steps.package_info.outputs.tag }}
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'
3 changes: 2 additions & 1 deletion 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 All @@ -94,7 +95,7 @@ class CustomInstallScriptsCommand(install_scripts):
},
install_requires=[
'boto3>=1.29',
'botocore>=1.32',
'botocore>=1.29',
'pyperclip>=1.8',
'keyring>=24.3',
'beautifulsoup4>=4.12',
Expand Down

0 comments on commit 45bab4a

Please sign in to comment.