Release v1.0.1 #1
Workflow file for this run
This file contains hidden or 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: Publish Release (PyPI + Conda) | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| # Build PyPI distributions | |
| build-pypi: | |
| name: Build PyPI Package | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build wheel setuptools | |
| - name: Build distribution | |
| run: python -m build | |
| - name: Upload PyPI artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pypi-dist-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: dist/ | |
| retention-days: 7 | |
| # Build Conda packages | |
| build-conda: | |
| name: Build Conda Package | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| channels: conda-forge | |
| channel-priority: strict | |
| activate-environment: build-env | |
| - name: Install conda-build | |
| shell: bash -l {0} | |
| run: | | |
| conda install -y conda-build anaconda-client | |
| - name: Build conda package | |
| shell: bash -l {0} | |
| run: | | |
| conda build conda.recipe --output-folder ./conda-bld | |
| - name: Upload Conda artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: conda-package-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: ./conda-bld/**/*.tar.bz2 | |
| retention-days: 7 | |
| # Publish to PyPI | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: build-pypi | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download PyPI artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: pypi-dist-* | |
| merge-multiple: true | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| # Publish to Anaconda Cloud | |
| publish-conda: | |
| name: Publish to Anaconda Cloud | |
| needs: build-conda | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: '3.11' | |
| channels: conda-forge | |
| - name: Install anaconda-client | |
| shell: bash -l {0} | |
| run: | | |
| conda install -y anaconda-client | |
| - name: Download Conda artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: conda-package-* | |
| merge-multiple: true | |
| path: ./conda-packages | |
| - name: Upload to Anaconda Cloud | |
| shell: bash -l {0} | |
| env: | |
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} | |
| run: | | |
| anaconda -t $ANACONDA_API_TOKEN upload ./conda-packages/**/*.tar.bz2 --force --label main | |
| # Create release summary | |
| release-summary: | |
| name: Release Summary | |
| needs: [publish-pypi, publish-conda] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create summary | |
| run: | | |
| echo "## 🎉 Release Published Successfully!" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Installation" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Via pip (PyPI):**" >> $GITHUB_STEP_SUMMARY | |
| echo '```bash' >> $GITHUB_STEP_SUMMARY | |
| echo "pip install slick_queue_py" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Via conda:**" >> $GITHUB_STEP_SUMMARY | |
| echo '```bash' >> $GITHUB_STEP_SUMMARY | |
| echo "conda install -c ${{ github.repository_owner }} slick_queue_py" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Links" >> $GITHUB_STEP_SUMMARY | |
| echo "- PyPI: https://pypi.org/project/slick_queue_py/" >> $GITHUB_STEP_SUMMARY | |
| echo "- Anaconda: https://anaconda.org/${{ github.repository_owner }}/slick_queue_py" >> $GITHUB_STEP_SUMMARY |