Skip to content

chore(deps): update dependency python to 3.13 (#66) #72

chore(deps): update dependency python to 3.13 (#66)

chore(deps): update dependency python to 3.13 (#66) #72

Workflow file for this run

name: release
on:
push:
branches:
- main
tags:
- "v*"
jobs:
test:
uses: ./.github/workflows/test.yml
publish-conda-pkg-to-anaconda-dot-org:
name: Publish conda package to Anaconda.org
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Retrieve the source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Create build environment
run: |
source $CONDA/bin/activate
conda create -n build --file ./etc/build.linux-64.lock
- name: Download the build artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: conda-${{ github.sha }}
path: ./conda-bld
- name: publish
env:
TOKEN: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
run: |
source $CONDA/bin/activate && conda activate build
# If it's not a tagged release, publish to dev label
[[ "$GITHUB_REF" =~ ^refs/tags/v ]] || export LABEL="--label dev"
anaconda --verbose \
--token $TOKEN \
upload \
--user anaconda-cloud \
$LABEL \
--force \
./conda-bld/noarch/anaconda-*
publish-wheel-to-anaconda-dot-org:
name: Publish wheel to Anaconda.org
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Retrieve the source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Download the build artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: wheel-${{ github.sha }}
path: ./dist
- name: Create build environment
run: |
source $CONDA/bin/activate
conda create -n build --file ./etc/build.linux-64.lock
- name: Upload to anaconda.org
env:
TOKEN: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
GITHUB_REF: ${{ github.ref }}
run: |
source $CONDA/bin/activate && conda activate build
# If it's not a tagged release, publish to dev label
[[ "$GITHUB_REF" =~ ^refs/tags/v ]] || export LABEL="--label dev"
anaconda --verbose \
--token $TOKEN \
upload \
--user anaconda-cloud \
$LABEL \
--force \
./dist/*.whl
publish-to-pypi:
name: Publish to PyPI
# Only publish to PyPI if a tagged release
if: startsWith(github.event.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
- name: Download the build artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: wheel-${{ github.sha }}
path: ./dist
- name: Install build dependencies
run: pip install hatch
- name: Upload to PyPI
run: hatch publish
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}