Skip to content

Commit

Permalink
update: publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Sep 21, 2021
1 parent d380c0f commit 2e0752d
Showing 1 changed file with 39 additions and 19 deletions.
58 changes: 39 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
name: Publish

on:
release:
types: [published]
push:
tags:
- 'v*'

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
deploy:
name: Deploy
needs: release
runs-on: ubuntu-latest
steps:
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python3 -m pip install -U wheel twine
- name: Build package
run: |
python3 setup.py sdist bdist_wheel
- name: Publish package to PyPI
run: |
python3 -m twine check dist/*
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python3 -m pip install -r requirements-dev.txt
python3 -m pip install -U wheel twine
- name: Build package
run: |
python3 setup.py sdist bdist_wheel
- name: Publish package to PyPI
run: |
python3 -m twine check dist/*
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 2e0752d

Please sign in to comment.