Skip to content
Open
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/scripts/install-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ wget --no-verbose -O $installer $url
bash $installer -bfp $CI_CONDA_DIR
set +ux
ci_conda_activate
conda install --quiet --yes --channel maddenp --repodata-fn repodata.json anaconda-client condev jq
conda install --quiet --yes --channel maddenp --repodata-fn repodata.json anaconda-client condev jq python-build
7 changes: 7 additions & 0 deletions .github/scripts/pypi-package-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -eux

. $(dirname ${BASH_SOURCE[0]})/common.sh
ci_conda_activate
unset CONDEV_SHELL

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.py omits install_requires when CONDEV_SHELL is set, and we need that info to get the Requires-Dist data.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty ignorant about how wheels are built: If install_requires is enabled, does the wheel still contain only the uwtools code, and not the code from dependency packages? I'd hope that the uwtools wheel just contains the uwtools code, plus metadata that tells it what other wheels to install along with it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the wheel contains the uwtools package, and install_requires adds the metadata.

set -ux
python -m build --no-isolation --wheel src
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
Comment on lines +12 to +13

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables GitHub OIDC for Trusted Publishing.

steps:
- uses: actions/checkout@v3
- name: Install conda
Expand All @@ -21,3 +23,9 @@ jobs:
run: .github/scripts/make-package.sh
- name: Publish
run: .github/scripts/publish.sh
- name: Make PyPI Package
run: .github/scripts/pypi-package-build.sh
- name: Publish PyPI Package
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: src/dist/
Loading