Skip to content

Virtual Account update #33

Virtual Account update

Virtual Account update #33

Workflow file for this run

name: Publish changes to Python library
on:
release:
types: [created]
jobs:
check-readme-and-changelog:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.7'
steps:
- name: checkout code
uses: actions/checkout@v2
- name: check for changes in readme and changelog files
run: |
if ! git diff --quiet HEAD~ HEAD -- README.md CHANGELOG.md; then
echo "README and/or CHANGELOG have been modified. Proceeding with deployment."
else
echo "README and/or CHANGELOG have not been modified. Terminating deployment."
exit 1
fi
- name: push build status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
if: always()
publish:
needs: check-readme-and-changelog
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.7'
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Setup python environment
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: install python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: build and publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: push build status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
if: always()