Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

upload RELEASE wheel to pypi.org #361

Merged
merged 8 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions .github/workflows/nm-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ jobs:
label: gcp-k8s-util
timeout: ${{ inputs.build_timeout }}
gitref: ${{ github.ref }}
wf_category: ${{ inputs.wf_category }}
whl: ${{ needs.BUILD.outputs.whl }}
secrets: inherit

# update docker
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/nm-upload-assets-to-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ on:
description: 'git commit hash or branch name'
type: string
required: true
wf_category:
description: "workflow category: REMOTE, NIGHTLY, RELEASE"
type: string
default: "REMOTE"
whl:
description: "wheel file path"
type: string
required: true

workflow_dispatch:
inputs:
Expand All @@ -31,6 +39,14 @@ on:
description: 'git commit hash or branch name'
type: string
required: true
wf_category:
description: "workflow category: REMOTE, NIGHTLY, RELEASE"
type: string
default: "REMOTE"
whl:
derekk-nm marked this conversation as resolved.
Show resolved Hide resolved
description: "wheel file path"
type: string
required: true

jobs:

Expand Down Expand Up @@ -68,6 +84,16 @@ jobs:
with:
path: assets

- name: push wheel to pypi.org
derekk-nm marked this conversation as resolved.
Show resolved Hide resolved
# this workflow is only run if push-to-pypi is True, and we only
# want to push RELEASE wheels to the external pypi.org
if: ${{ inputs.wf_category }} == "RELEASE"
derekk-nm marked this conversation as resolved.
Show resolved Hide resolved
uses: neuralmagic/nm-actions/actions/publish_whl/action.yml@main
derekk-nm marked this conversation as resolved.
Show resolved Hide resolved
with:
username: ${{ secrets.PYPI_PUBLIC_USER }}
password: ${{ secrets.PYPI_PUBLIC_AUTH }}
whl: ${{ inputs.whl }}

# GCP
- name: 'Authenticate to Google Cloud'
id: auth
Expand Down
Loading