Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech authored May 4, 2024
1 parent 4f5cb49 commit af8da94
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: Publish Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Buld the distribution package
- run: pipx run build
- name: Store the distribution package
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mpy-cross-multi
permissions:
id-token: write

steps:
- name: Download the dist
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit af8da94

Please sign in to comment.