Skip to content

Merge pull request #29 from OPERA-Cal-Val/dev #8

Merge pull request #29 from OPERA-Cal-Val/dev

Merge pull request #29 from OPERA-Cal-Val/dev #8

Workflow file for this run

name: Distribute to PyPI
on:
push:
tags:
- v*
jobs:
distribute:
runs-on: ubuntu-latest
outputs:
SDIST_VERSION: ${{ steps.build.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools build "setuptools-scm[toml]"
- name: Build distribuion
id: build
run: |
git fetch origin +refs/tags/*:refs/tags/*
export SDIST_VERSION=$(python -m setuptools_scm)
echo "::set-output name=version::${SDIST_VERSION}"
python -m build
- name: upload to PyPI.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}