Version 1.1.4 #7
Workflow file for this run
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
name: Deploy packages to PyPI and Anaconda | |
on: | |
release: | |
types: [released] | |
jobs: | |
# Build packages | |
build: | |
uses: ./.github/workflows/build.yml | |
# Anaconda | |
deploy-conda: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
needs: | |
- build | |
steps: | |
- name: Download the conda dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: conda-dist | |
path: dist/ | |
- name: Set up Python 3.10 for Anaconda | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Setup anaconda | |
run: | | |
# $CONDA is an environment variable pointing to the root of the miniconda directory | |
echo $CONDA/bin >> $GITHUB_PATH | |
conda install --yes anaconda-client | |
- name: Upload to Anaconda | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
ls | |
cd dist | |
ls | |
anaconda upload --label main osx-64/*.tar.bz2 | |
anaconda upload --label main linux-64/*.tar.bz2 | |
anaconda upload --label main win-64/*.tar.bz2 | |
# Pypi | |
deploy-pypi: | |
environment: | |
name: pypi | |
url: https://pypi.org/p/ravenpackapi | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
needs: | |
- build | |
steps: | |
- name: Download the pypi dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: pypi-dist | |
path: dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |