Skip to content

Add GH action for build and uploading wheel #1

Add GH action for build and uploading wheel

Add GH action for build and uploading wheel #1

Workflow file for this run

name: Build
on: [push]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install build requirements
run: |
sudo apt-get update && sudo apt-get install -y jq nodejs
- name: Build wheel
run: |
make build-wheel
- name: Create release
id: create_release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Version ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload release wheel
id: upload_release
if: steps.create_release.outcome == 'success'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: jq -r .version package.json
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/jupyterlab_custom_order-"$VERSION"-py3-none-any.whl
asset_name: jupyterlab_custom_order-"$VERSION"-py3-none-any.whl