Bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.3 #1246
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: build wheel | |
on: | |
push: | |
branches: | |
- main | |
# Release branches | |
- "[0-9]+.[0-9]+.x" | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
- "[0-9]+.[0-9]+.x" | |
jobs: | |
build_wheel: | |
name: Build wheel | |
runs-on: ubuntu-latest | |
steps: | |
- name: Using ref ${{ github.ref }} | |
run: echo "${{ github.ref }}" | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: python -m pip install --upgrade build | |
- name: Insert Git hash into version | |
run: .github/scripts/insert_git_hash.sh src/gurobi_ml/_version.py | |
- name: Build wheel | |
run: python -m build | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/* | |
if-no-files-found: error | |
upload_conda: | |
name: Upload to Conda staging | |
runs-on: ubuntu-latest | |
needs: build_wheel | |
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/quick2') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: python -m pip install --upgrade twine | |
- name: Twine check | |
run: python -m twine check dist/artifact/* | |
- name: Upload to staging | |
env: | |
ANACONDA_STAGING_TOKEN: ${{ secrets.ANACONDA_STAGING_TOKEN }} | |
run: | |
bash .github/scripts/upload_anaconda.sh |