Skip to content

Commit

Permalink
Try release with github actions and rebased repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
nshepperd committed Mar 17, 2024
1 parent aea5371 commit 8e064ea
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 32 deletions.
70 changes: 39 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,34 +151,42 @@ jobs:
asset_name: ${{env.wheel_name}}
asset_content_type: application/*

# publish_package:
# name: Publish package
# needs: [build_wheels]

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3

# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'

# - name: Install dependencies
# run: |
# pip install ninja packaging setuptools wheel twine
# # We don't want to download anything CUDA-related here
# pip install torch --index-url https://download.pytorch.org/whl/cpu

# - name: Build core package
# env:
# FLASH_ATTENTION_SKIP_CUDA_BUILD: "TRUE"
# run: |
# python setup.py sdist --dist-dir=dist

# - name: Deploy
# env:
# TWINE_USERNAME: "__token__"
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# run: |
# python -m twine upload dist/*
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.wheel_name}}
path: ./dist/${{env.wheel_name}}

publish_package:
name: Publish package
needs: [build_wheels]

runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install setuptools==68.0.0
pip install git+https://github.com/nshepperd/setuptools-cuda-cpp
pip install ninja packaging wheel pybind11
- name: Build core package
run: |
python setup.py sdist --dist-dir=dist
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion src/flash_attn_jax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .flash import flash_mha
__version__ = 'v2.5.5'
__version__ = 'v0.1.0'

0 comments on commit 8e064ea

Please sign in to comment.