Skip to content

Commit 9ec3d77

Browse files
committed
Build pypi
1 parent 793097a commit 9ec3d77

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [ main ]
66

77
jobs:
8-
build:
8+
documentation:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
@@ -30,4 +30,30 @@ jobs:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
BRANCH: gh-pages # The branch the action should deploy to.
3232
FOLDER: public_html # The folder the action should deploy.
33-
CLEAN: true
33+
CLEAN: true
34+
35+
pypi:
36+
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: pypi
40+
url: https://pypi.org/p/python_workflow_definition
41+
permissions:
42+
id-token: write
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: conda-incubator/setup-miniconda@v3
46+
with:
47+
auto-update-conda: true
48+
python-version: "3.12"
49+
environment-file: binder/environment.yml
50+
auto-activate-base: false
51+
- name: Build
52+
shell: bash -l {0}
53+
run: |
54+
cd python_workflow_definition
55+
hatch build
56+
- name: Publish distribution 📦 to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
packages-dir: python_workflow_definition/

0 commit comments

Comments
 (0)