Skip to content

Commit

Permalink
Publish Package to pypi (#62)
Browse files Browse the repository at this point in the history
* pypi publish workflow

* actually build the package

* update ci workflows while we're at it
  • Loading branch information
timothyas authored Nov 22, 2023
1 parent ddb1b91 commit 06a285b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3
env:
# Increase this value to reset cache if ci/environment.yaml has not changed
CACHE_NUMBER: 0
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/xesn
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 06a285b

Please sign in to comment.