Skip to content

Merge pull request #11 from mh105/main #4

Merge pull request #11 from mh105/main

Merge pull request #11 from mh105/main #4

Workflow file for this run

name: Publish package
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages
run: |
python -m pip install build twine
- name: Build
run: |
python -m build
- name: Attach binaries
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
dist/*
- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1