Skip to content

Commit

Permalink
add release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed Nov 29, 2020
1 parent 6445be6 commit b5f13f8
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Package Release

on:
- release

jobs:
release:
name: Publish to official pypi
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'HansBug/plantumlcli' }}
strategy:
matrix:
os:
- 'ubuntu-18.04'
python-version:
- '3.8'

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 20
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up python dependences
run: |
pip install --upgrade pip
pip install --upgrade flake8 setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
pip install --upgrade build
- name: Build packages
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to real PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit b5f13f8

Please sign in to comment.