Skip to content

Add a simple bash script to allow for the creation of a FIWARE clone #315

Add a simple bash script to allow for the creation of a FIWARE clone

Add a simple bash script to allow for the creation of a FIWARE clone #315

name: Build Python Package
on:
release:
types: [published]
pull_request:
push:
branches:
- master
jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
defaults:
run:
working-directory: ./anubis-management-api
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: |
anubis-management-api/Pipfile.lock
- name: Install pipenv
run: pip install pipenv
- name: Build distribution
run: |
pipenv run python setup.py bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ./anubis-management-api/dist/
- name: Test package
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name != 'release' && github.event.action != 'published'
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
packages_dir: ./anubis-management-api/dist/
skip_existing: true