Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pypi publish automation #201

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish release

on:
push:
tags:
- "v*"

jobs:
test:
uses: ./.github/workflows/test.yml

publish:
needs: [test]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/haas/
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install build dependencies
run: |
pip install build
- name: Build packages
run: |
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Test

on:
workflow_call:
pull_request:
push:
branches:
- master
- maintenance/**
tags:
- "v*"

env:
PYTHONUNBUFFERED: "1"
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes since version 0.9.0
===========================

* Replace ``setup.py`` with ``pyproject.toml`` (#199).
* Automate package publishing (#201).


Version 0.9.0
Expand Down