Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test source distribution and binary distribution (.whl) before release to PyPI #4073

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)

#Set an environment variable with the date range
# Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"

Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release # makes PyPI releases
# Make PyPI releases
name: Release

on:
release:
Expand Down Expand Up @@ -26,12 +27,12 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build sdist
- name: Build source distribution
run: |
pip install build
python -m build --sdist
Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
# For pypi trusted publishing
# For PyPI trusted publishing
id-token: write
steps:
- name: Set up Python
Expand All @@ -81,9 +82,12 @@ jobs:
merge-multiple: true
path: dist

- name: Publish to PyPi or TestPyPI
- name: Publish to PyPI or TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
repository-url: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.task == 'test-release' && 'https://test.pypi.org/legacy/' || '' }}
repository-url: >
${{ github.event_name == 'workflow_dispatch' &&
github.event.inputs.task == 'test-release' &&
'https://test.pypi.org/legacy/' || '' }}
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
- name: Install ubuntu-only conda dependencies
if: matrix.config.os == 'ubuntu-latest'
run: |
micromamba install -n pmg -c conda-forge bader enumlib openff-toolkit packmol pygraphviz tblite --yes
micromamba install -n pmg -c conda-forge bader enumlib \
openff-toolkit packmol pygraphviz tblite --yes

- name: Install pymatgen and dependencies via uv
run: |
Expand Down