Skip to content

Commit

Permalink
Merge pull request #7 from panoptes/add-gha-pypi-release
Browse files Browse the repository at this point in the history
Adding GHA for PyPi release.
  • Loading branch information
wtgee authored Feb 3, 2024
2 parents 35250bb + ee14173 commit 68e7f3d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This will create a release for any properly tagged branch.
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v[0-9].[0-9]+.[0-9]+' # Push events to matching vX.Y.Z, but not vX.Y.Zdev

name: Create GitHub Release

jobs:
build:
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.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: |
See Changelog for details
draft: false
prerelease: false
deploy:
name: Push Release to PyPi
runs-on: ubuntu-latest
steps:
- 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 ".[testing]"
- name: tox clean and build
run: |
tox -e clean
tox -e build
- name: tox publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
tox -e publish -- --repository pypi

0 comments on commit 68e7f3d

Please sign in to comment.