Skip to content

Commit

Permalink
Feature/push pypi (#30)
Browse files Browse the repository at this point in the history
* Updated release.md

* /version 1.6.0-rc.2 [skip actions]

* /version 1.6.0 [skip actions]

* added build and publish for pypi

* update GHA build - install python wheel

Co-authored-by: nchung <[email protected]>
Co-authored-by: podaac-cloud-IandA <[email protected]>
Co-authored-by: Nga Chung <[email protected]>
  • Loading branch information
4 people authored Mar 17, 2022
1 parent e0f1069 commit 2e3d47e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
- name: Install Python dependencies
run: |
pip3 install -r builder/requirements.txt
pip3 install --upgrade build
pip3 install --upgrade wheel
- name: Get Version
run: echo ::set-output name=current_version::$(python3 builder/get-version.py -f cumulus_sns_schema.json)
id: get-version
Expand Down Expand Up @@ -82,6 +84,9 @@ jobs:
echo "New Version is: ${{ env.software_version }}"
python3 builder/update-version.py -f cumulus_sns_schema.json -v ${{ env.software_version }}
python3 builder/builder.py -d . -a ${{env.ARTIFACT_BASE_NAME}}
- name: Build Python package
run: |
python3 setup.py sdist bdist_wheel
- name: Prepare Artifacts
run: |
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
Expand Down Expand Up @@ -138,6 +143,12 @@ jobs:
asset_path: "${{ env.ARTIFACT_FILE }}"
asset_name: "${{ env.ARTIFACT_FILE }}"
asset_content_type: application/zip
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Commit Version Bump
# If building develop, a release branch, or master then we commit the version bump back to the repo
if: |
Expand Down
2 changes: 1 addition & 1 deletion cumulus_sns_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"1.4.1",
"1.5",
"1.5.1",
"1.6.0-alpha.1"
"1.6.0"
]
},
"receivedTime": {
Expand Down
6 changes: 3 additions & 3 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## [1.5.1] - 2020-11-10
## [1.6.0] - 2022-03-10
### Added
### Changed
### Deprecated
### Removed
### Fixed
- **PODAAC-2733**
- Updated the CNM schema so product can be used in either the CNM notification or CNM response.
- **PODAAC-4307**
- Added optional dataProcessingType to product.
### Security
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from setuptools import setup, find_packages

# with open("README.md", "r", encoding="utf-8") as fh:
# long_description = fh.read()

with open('version.txt', "r", encoding="utf-8") as f:
version = f.read().strip()

setup(
name="podaac-cloud-notification-message-schema",
version=version,
description="PO.DAAC Cloud Notification Message Schema",
url='https://github.com/podaac/cloud-notification-message-schema',
author='PO.DAAC',
author_email='[email protected]',
install_requires=[
],
extras_require={
'testing': [
'pytest==5.3.5'
]
},
packages=find_packages(exclude=['tests']),
include_package_data=True
)

0 comments on commit 2e3d47e

Please sign in to comment.