Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed release workflow #988

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading