Skip to content

Commit

Permalink
Introduced github actions workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
akornatskyy committed Aug 10, 2020
1 parent 8573f3f commit 17abb56
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci-cd.yml
@@ -0,0 +1,37 @@
name: CI/CD
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
version=$(git describe --tags --always)
sed -i 's/^__version__ = .*$/__version__ = "'"${version}"'"/' \
src/wheezy/core/__init__.py
python setup.py sdist
twine upload dist/*
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

0 comments on commit 17abb56

Please sign in to comment.