Skip to content

Commit

Permalink
update release ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
azoner committed May 28, 2021
1 parent cb8cf87 commit 7a46588
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 81 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/publish-to-test-pypi.yml

This file was deleted.

36 changes: 9 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
name: Release Python Package
name: Publish to PyPI

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
release:
types: [created]

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
draft: true
prerelease: true
deploy:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish to Test PyPI
if: contains(github.ref, "beta") || contains(github.ref, "rc")
#if: contains(github.ref, "beta") || contains(github.ref, "rc")
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
Expand Down

0 comments on commit 7a46588

Please sign in to comment.