Skip to content

Commit

Permalink
Fixed release workflow (#988)
Browse files Browse the repository at this point in the history
Previous one failed
https://github.com/dask/dask-ml/actions/runs/8516080288

Trying out the trusted publisher thing.
  • Loading branch information
TomAugspurger committed Apr 2, 2024
1 parent d7727ea commit 12d396b
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,36 @@ on:
types:
- created

permissions:
contents: read

jobs:
release:
name: release
check-package:
name: Build & inspect our package.
runs-on: ubuntu-latest
if: ${{ github.repository }} == 'dask/dask-ml'
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.x
uses: actions/setup-python@v2
- uses: actions/checkout@v4
with:
python-version: "3.x"
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

- name: Install release dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
release-pypi:
permissions:
id-token: write
contents: read
name: Publish released package to pypi.org
environment: release-pypi
if: github.event.action == 'published'
runs-on: ubuntu-latest
needs: build-package

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Build and publish package
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 12d396b

Please sign in to comment.