-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalize hatch-vcs configuration (#31)
* Finalize hatch-vcs configuration * Add PyPI workflow * Pin actions * Do not depend on conda in pyproject.toml's dependencies (just in the conda deps) * depth 0
- Loading branch information
Showing
6 changed files
with
86 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install build tools | ||
run: python -m pip install --upgrade pip wheel setuptools build twine | ||
|
||
- name: Build wheels | ||
run: python -m build --sdist --wheel . --outdir dist | ||
|
||
- name: Check wheels | ||
working-directory: dist | ||
run: | | ||
ls -alh | ||
python -m pip install *.whl | ||
python -m twine check * | ||
- name: Upload release distributions | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
needs: [build] | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Retrieve release distributions | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
- name: Publish release distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,6 @@ dmypy.json | |
|
||
# Used in debugging | ||
explicit.txt | ||
|
||
# hatch-vcs | ||
conda_pypi/_version.py |
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
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