Skip to content

PyQUDA publish

PyQUDA publish #7

Workflow file for this run

name: PyQUDA publish
on:
workflow_dispatch:
inputs:
tag:
description: Which tag to create and release?
required: true
default: 0.0.0
jobs:
pypi-publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/PyQUDA
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: python -m pip install build
- name: Build sdist
run: python -m build ./pyquda_core --sdist
- name: Upload sdist
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.tag }}
files: pyquda_core/dist/pyquda-${{ github.event.inputs.tag }}.tar.gz
fail_on_unmatched_files: true
- name: Prepare sdist
run: mv ./pyquda_core/sdist ./
- name: Publish sdist
uses: pypa/gh-action-pypi-publish@release/v1