XGA v0.5.1 - Revamp of entropy & mass profiles, and new thermal pressure profile #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Large parts of this are directly copied or adapted from | |
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
# This action triggers the second stage of publishing this module. When a new release is created this action will begin. It builds the module, then | |
# publishes it to the real PyPI index | |
# The overall name of the action | |
name: Publish XGA to real PyPI, triggered on creation of release | |
# This action triggers when there is a release to the repo, but only when the release is published | |
on: | |
release: | |
types: [published] | |
# Now the actual jobs we want the action to do are setup | |
jobs: | |
# The only job in this action, building and publishing the XGA Python module | |
build-n-publish: | |
name: Build and publish XGA | |
# The build/publishing process runs on the latest Ubuntu - not super important what this is for this use case, so long as its not Windows | |
runs-on: ubuntu-latest | |
# This job has several steps | |
steps: | |
# Checks out the master branch (what we want to build and publish - hopefully with the VCS info that versioneer needs), then | |
# activates a relatively recent version of Python | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup the Python install | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
# The next two chunks set up PIP properly and build the module | |
- name: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
# Then the module is published to the real PyPI index | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |