Skip to content

v1.12.1 🌈

v1.12.1 🌈 #8

name: Release | PyPi Build Package and Push
on:
release:
types: [published]
jobs:
build_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_dependencies
run: |
pip3 install --user --upgrade pipenv && pipenv install --dev --python 3.8
shell: bash
- name: bump_version
run: |
echo "[INFO] Get latest tag"
git fetch --all --tags
RELEASE_VERSION=$(git tag --sort version:refname | tail -1)
RELEASE_VERSION=$(echo $RELEASE_VERSION | sed s/v//)
echo $RELEASE_VERSION
echo "[INFO] Write version"
sed -i s/$PLACEHOLDER/$RELEASE_VERSION/ $INIT_FILE
env:
INIT_FILE: leverage/__init__.py
PLACEHOLDER: 0.0.0
- name: clean
run: |
rm -rf ./build/ && rm -rf ./dist/
- name: build
run: |
pipenv run python setup.py sdist bdist_wheel
- name: check
run:
pipenv run twine check dist/*
- name: upload
run: |
pipenv run twine upload --non-interactive --repository-url https://upload.pypi.org/legacy/ dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- name: commit_push
run: |
git push
- uses: act10ns/slack@v1
if: always()
with:
status: ${{ job.status }}
channel: $SLACK_CI_CHANNEL
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CI_CHANNEL: ${{ secrets.SLACK_CI_CHANNEL }}