Skip to content

Release v1.5.1

Release v1.5.1 #25

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is published
# Based on https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Publish to PyPI
on:
push:
tags: # Sequence of patterns matched against refs/tags
- 'v*' # Any tag matching v*, e.g. v1.0, v1.2b1
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Check and get Version Number
id: get_version
run: |
pip install .
PYTHON_VERSION=`python -c 'import snewpy; print(snewpy.__version__)'`
echo "PYTHON_VERSION=${PYTHON_VERSION}"
GIT_VERSION=${GITHUB_REF/refs\/tags\/v/}
echo "GIT_VERSION=${GIT_VERSION}"
if [ $PYTHON_VERSION != $GIT_VERSION ]; then exit 1; fi
echo "VERSION=${PYTHON_VERSION}" >> $GITHUB_OUTPUT
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_JM }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Create Draft Release
# Go to https://github.com/SNEWS2/snewpy/releases to edit this draft release and publish it
# Once it is published, the release automatically is pushed to Zenodo: https://doi.org/10.5281/zenodo.4498940
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: |
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4498940.svg)](https://doi.org/10.5281/zenodo.4498940)
(TODO: This DOI always points to the latest version. Replace it with the DOI for this specific release!)
List major changes since the last release here: newly added models, new features, etc.
If necessary, also list breaking changes: removed features, renamed command line options, new minimum Python version, etc.
draft: true
prerelease: false