Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: ReleaseCmdStanPy
name: Release CmdStanPy

on:
workflow_dispatch:
inputs:
new_version:
description: 'New version, for example: 0.9.69'
description: "New version, for example: 0.9.69"
required: true

jobs:
release-cmdstanpy:
name: publish release and update read the docs default version
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
fail-fast: false
name: publish release
runs-on: ubuntu-latest
environment: publishing
permissions:
id-token: write # OIDC
contents: write

steps:
- name: Check out source code
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install os dependencies
run: |
Expand All @@ -32,7 +30,7 @@ jobs:

- name: Install dependencies (python)
run: |
python -m pip install --upgrade pip wheel build twine requests
python -m pip install --upgrade pip wheel build
pip install -e .[docs,test]

- name: Install CmdStan
Expand Down Expand Up @@ -84,9 +82,9 @@ jobs:
- name: Install bdist_wheel
run: pip install dist/*.whl

- name: Upload to pypi
- name: Publish on PyPI
if: success()
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: python -m twine upload -u ${TWINE_USERNAME} -p ${TWINE_PASSWORD} --skip-existing dist/*
uses: pypa/[email protected]
with:
packages-dir: dist/
skip-existing: true