Merge pull request #1691 from spotify/mob/publish-pip-package

Added techdocs-core pip publish in master workflow
This commit is contained in:
Emma Indal
2020-07-21 13:53:23 +02:00
committed by GitHub
4 changed files with 50 additions and 11 deletions
+8 -6
View File
@@ -4,9 +4,11 @@
# The last matching pattern takes precedence.
# https://help.github.com/articles/about-codeowners/
* @spotify/backstage-core
/docs/features/techdocs @spotify/techdocs-core
/plugins/techdocs @spotify/techdocs-core
/plugins/techdocs-backend @spotify/techdocs-core
/packages/techdocs-cli @spotify/techdocs-core
/packages/techdocs-container @spotify/techdocs-core
* @spotify/backstage-core
/docs/features/techdocs @spotify/techdocs-core
/plugins/techdocs @spotify/techdocs-core
/plugins/techdocs-backend @spotify/techdocs-core
/packages/techdocs-cli @spotify/techdocs-core
/packages/techdocs-container @spotify/techdocs-core
/.github/workflows/techdocs.yml @spotify/techdocs-core
/.github/workflows/techdocs-pypi.yml @spotify/techdocs-core
+37
View File
@@ -0,0 +1,37 @@
name: Master Build TechDocs PyPI Publish
on:
push:
branches: [master]
paths:
- '.github/workflows/techdocs-master.yml'
- 'packages/techdocs-container/**'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7]
steps:
# Publish techdocs-core to PyPI
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Build Python distribution
working-directory: ./packages/techdocs-container/techdocs-core
run: |
pip install wheel
rm -rf dist
python setup.py bdist_wheel sdist --formats gztar
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_KEY }}
packages_dir: ./packages/techdocs-container/techdocs-core/dist
+2 -2
View File
@@ -33,12 +33,12 @@ jobs:
push: false
# Lint Python code for techdocs-core package
- name: prepare python environment
- name: Prepare Python environment
run: |
python3 -m pip install --index-url https://pypi.org/simple/ setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --index-url https://pypi.org/simple/ -r $TECHDOCS_CORE_PATH/requirements.txt
- name: lint techdocs-core package
- name: Lint techdocs-core package
run: |
python3 -m black --check $TECHDOCS_CORE_PATH/src
@@ -18,13 +18,13 @@ from setuptools import setup, find_packages
setup(
name='mkdocs-techdocs-core',
version='0.0.1',
version='0.0.2',
description='A Mkdocs package that contains TechDocs defaults',
long_description='',
keywords='mkdocs',
url='https://github.com/spotify/backstage',
author='Spotify',
author_email='fossboard@spotify.com',
author='TechDocs Core',
author_email='pulp-fiction@spotify.com',
license='Apache-2.0',
python_requires='>=3.7',
install_requires=[