Merge pull request #484 from baobabsoluciones/release/v1.0.8 #35
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: Publish cornflow-client Python 🐍 distributions 📦 to PyPI | |
on: | |
push: | |
tags: | |
- "client*" | |
jobs: | |
build-n-publish: | |
name: Build and publish cornflow-client Python 🐍 distributions 📦 to PyPI | |
defaults: | |
run: | |
working-directory: ./libs/client | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install wheel | |
run: >- | |
python -m | |
pip install | |
wheel | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: python setup.py sdist bdist_wheel | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ | |
packages_dir: libs/client/dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} | |
packages_dir: libs/client/dist/ | |
- name: Get version number | |
uses: jungwinter/split@v2 | |
id: split | |
with: | |
msg : ${{ github.ref_name}} | |
separator: "t" | |
- name: Notify slack channel | |
uses: slackapi/[email protected] | |
with: | |
slack-message: "A new version of cornflow client (v${{ steps.split.outputs._1 }}) has been deployed" | |
channel-id: ${{ secrets.SLACK_CHANNEL }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | |