Skip to content

Commit

Permalink
chore: update and replace pypi.yml with publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
synchon committed Jan 24, 2025
1 parent 80438c2 commit 834b2fe
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 31 deletions.
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: Build and publish

on:
push:
branches:
- main
tags:
- 'v*'

jobs:
build-and-publish:
name: Build and publish
runs-on: ubuntu-latest
permissions:
# Needed for PyPI publishing
id-token: write
# Needed for GitHub releases
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build
run:
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run:
python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Make release on GitHub
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.tar.gz
dist/*.whl
generate_release_notes: true
make_latest: true
31 changes: 0 additions & 31 deletions .github/workflows/pypi.yml

This file was deleted.

0 comments on commit 834b2fe

Please sign in to comment.