Skip to content

Commit

Permalink
Add uploading artifact to workflow
Browse files Browse the repository at this point in the history
* Add uploading artifact
  • Loading branch information
fzakaria authored Jan 15, 2024
1 parent d33422b commit c7522ea
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion .github/workflows/publishWheelRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,49 @@ jobs:
ninja check-stablehlo-python
env:
CMAKE_BUILD_TYPE: Release
LLVM_ENABLE_BINDINGS: ON
LLVM_ENABLE_BINDINGS: ON

- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: pip install build

- name: Build Python Wheel"
shell: bash
run: |
cd "$GITHUB_WORKSPACE/stablehlo/integrations/python"
python3 -m build -w --dist-dir $GITHUB_WORKSPACE/${{ github.sha }}
- name: Upload an artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: build_artifact
path: ${{ github.sha }}

upload-tarballs:
runs-on: ubuntu-20.04
needs: cmake-build

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build_artifact
path: ${{ github.sha }}

- name: Release current commit
uses: ncipollo/release-action@v1.13.0
with:
artifacts: "${{ github.sha }}/*.whl"
token: "${{ secrets.GITHUB_TOKEN }}"
tag: "dev-wheels"
name: "dev-wheels"
removeArtifacts: false
allowUpdates: true
replacesArtifacts: true
makeLatest: true

0 comments on commit c7522ea

Please sign in to comment.