Skip to content

Update CHANGELOG.md with v0.0.5 #8

Update CHANGELOG.md with v0.0.5

Update CHANGELOG.md with v0.0.5 #8

Workflow file for this run

name: Build and upload to TestPyPI / PyPI
on:
push:
tags:
- "v*"
release:
types:
- published
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
if: "github.repository == 'MDAnalysis/mdadash'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install pipx twine
- name: Build package
run: |
python -m pipx run build
- name: Check package build
run: |
SDIST=$(ls -t1 dist/mdadash-*.tar.gz | head -n 1)
test -n "${SDIST}" || { echo "no source distribution dist/mdadash-*.tar.gz found"; exit 1; }
echo "twine check $SDIST"
twine check $SDIST
WHL=$(ls -t1 dist/mdadash-*.whl | head -n 1)
test -n "${WHL}" || { echo "no whl dist/mdadash-*.whl found"; exit 1; }
echo "twine check $WHL"
twine check $WHL
- name: Install from wheel and verify
run: |
WHL=$(ls -t1 dist/mdadash-*.whl | head -n 1)
python -m pip uninstall -y mdadash || true
python -m pip install $WHL
mdadash -h
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/
publish_testpypi:
name: Publish to TestPyPI
needs: build
if: |
github.repository == 'MDAnalysis/mdadash' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
environment:
name: testpypi
url: https://test.pypi.org/p/mdadash
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: artifacts
path: dist
- name: Check directory contents
run: |
echo "Contents of the dist directory:"
ls -l dist
- name: Upload to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/
verbose: true
publish_pypi:
name: Publish to PyPI
needs: build
if: |
github.repository == 'MDAnalysis/mdadash' &&
github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/mdadash
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: artifacts
path: dist
- name: Check directory contents
run: |
echo "Contents of the dist directory:"
ls -l dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1