Add upload update methods for templates and objects (#24) #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "On Release" | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
content_apis_version: $(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
jobs: | |
# Run tests. | |
# See also https://docs.docker.com/docker-hub/builds/automated-testing/ | |
push-to-pypi-store: | |
name: Push to pypi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
working-directory: python | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Generate version file | |
working-directory: python | |
run: | | |
echo "VERSION = \"${{ env.content_apis_version }}\"" > kadalu_content_apis/version.py | |
- name: Publish to Pypi | |
working-directory: python | |
run: | | |
rm -rf dist; VERSION=${{ env.content_apis_version }} python setup.py sdist bdist_wheel; | |
TWINE_PASSWORD=${{ secrets.TWINE_PASSWORD }} twine upload --username aravindavk dist/* |