Skip to content

Commit

Permalink
fix for publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LuukBlom committed Jan 13, 2025
1 parent 4d42837 commit e1bde8f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ name: release
# 1. In github settings:
# - Create an environment called `release`
# - Setup the permissions (https://github.com/<ORGANIZATION>/<REPO_NAME>/settings/environments)
# - Add the following variables:
# - PACKAGE_NAME: the name of your package on pypi
# - PYTHON_VERSION: the version of Python you want to use

# 2. On PyPi:
# - Create the project and add a trusted publisher (https://pypi.org/manage/project/<PACKAGE_NAME>/settings/publishing/ or https://pypi.org/manage/account/publishing if the project is not on pypi yet)
# - Ensure the publisher is configured to use:
# - the filename of this workflow yml (in this case: publish-to-pypi.yml)

# 3. In this file:
# - Add the following variables to the `env` section:
# - PACKAGE_NAME: the name of your package on pypi
# - PYTHON_VERSION: the version of Python you want to use
# - In the `setup_and_build` job:
# - Update the the shell commands to install your package

Expand All @@ -36,7 +37,12 @@ on:
- v[0-9]+\.[0-9]+\.[0-9]+
# https://peps.python.org/pep-0440/

env:
PACKAGE_NAME: "cht-observations"
PYTHON_VERSION: "3.10"

jobs:

details:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -95,10 +101,13 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: publish
python-version: ${{ env.PYTHON_VERSION }}
channels: conda-forge

- name: Create environment
shell: bash -el {0}
run: |
conda create -n publish python=${{ env.PYTHON_VERSION }}
- name: Install Build tools
shell: bash -el {0}
run: |
Expand Down

0 comments on commit e1bde8f

Please sign in to comment.