Skip to content
Merged
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
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish to PyPI

on:
workflow_dispatch:

jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build
run: python -m pip install build
- name: Build distributions
run: python -m build
- name: Check distributions
run: |
pip install twine
twine check dist/*
- name: Store distributions
uses: actions/upload-artifact@v4
with:
name: pypi-dist
path: dist/

publish:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
name: Publish to PyPI
needs: build
Comment thread
sourcepirate marked this conversation as resolved.
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/neutro/
permissions:
id-token: write # Required for OIDC
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: pypi-dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading