Skip to content

Commit 1010671

Browse files
authored
Update action tags (#298)
* use the new action * minor update * update action tags * add a check to verify the 0,1 returned value * update condition * minor fix
1 parent dad88af commit 1010671

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676

7777
- name: build
7878
id: build
79-
uses: neuralmagic/nm-actions/actions/build-ml-whl@v1.17.0
79+
uses: neuralmagic/nm-actions/actions/build-ml-whl@v1.18.0
8080
with:
8181
dev: false
8282
release: ${{ inputs.wf_category == 'RELEASE' }}

.github/workflows/upload.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,34 @@ jobs:
9999

100100
- name: check if whl is new
101101
id: check-whl
102-
uses: neuralmagic/nm-actions/actions/check-whl-on-pypi@scm
102+
uses: neuralmagic/nm-actions/actions/check-whl-on-pypi@v1.18.0
103103
with:
104104
whl: ${{ steps.find-asset-whl.outputs.asset }}
105105

106106
- name: upload whl to "nm-pypi"
107-
if: ${{ inputs.push_to_pypi && steps.check-whl.outputs.status }}
107+
if: ${{ steps.check-whl.outputs.status == '0' && inputs.push_to_pypi }}
108108
uses: neuralmagic/nm-actions/actions/gcp-upload-asset@v1.1.0
109109
with:
110110
bucket_target: ${{ secrets.GCP_NM_PYPI_DIST }}
111111
asset: ${{ steps.find-asset-whl.outputs.asset }}
112112

113113
- name: find tar.gz
114-
if: ${{ steps.check-whl.outputs.status }}
114+
if: ${{ steps.check-whl.outputs.status == '0' && inputs.push_to_pypi }}
115115
id: find-asset-targz
116116
uses: neuralmagic/nm-actions/actions/find-asset@v1.1.0
117117
with:
118118
run_id: ${{ inputs.run_id }}
119119
asset_identifier: 'compressed*.tar.gz'
120120

121121
- name: upload tar.gz to "nm-pypi"
122-
if: ${{ inputs.push_to_pypi && steps.check-whl.outputs.status }}
122+
if: ${{ steps.check-whl.outputs.status =='0' && inputs.push_to_pypi }}
123123
uses: neuralmagic/nm-actions/actions/gcp-upload-asset@v1.1.0
124124
with:
125125
bucket_target: ${{ secrets.GCP_NM_PYPI_DIST }}
126126
asset: ${{ steps.find-asset-targz.outputs.asset }}
127127

128128
- name: update "nm-pypi" index
129-
if: ${{ steps.check-whl.outputs.status }}
129+
if: ${{ steps.check-whl.outputs.status == '0' && inputs.push_to_pypi }}
130130
uses: actions/github-script@v6
131131
with:
132132
github-token: ${{ secrets.NM_PYPI_WORKFLOW }}
@@ -141,7 +141,7 @@ jobs:
141141
142142
# publish the wheel file to public pypi
143143
- name: push wheel to pypi.org
144-
if: ${{ inputs.push_to_pypi && steps.check-whl.outputs.status }}
144+
if: ${{ steps.check-whl.outputs.status == '0' && inputs.push_to_pypi }}
145145
uses: neuralmagic/nm-actions/actions/publish-whl@v1.0.0
146146
with:
147147
username: ${{ secrets.PYPI_PUBLIC_USER }}
@@ -150,7 +150,7 @@ jobs:
150150

151151
# publish the tar.gz file to public pypi
152152
- name: push wheel to pypi.org
153-
if: ${{ inputs.push_to_pypi && steps.check-whl.outputs.status }}
153+
if: ${{ steps.check-whl.outputs.status == '0' && inputs.push_to_pypi }}
154154
uses: neuralmagic/nm-actions/actions/publish-whl@v1.0.0
155155
with:
156156
username: ${{ secrets.PYPI_PUBLIC_USER }}

0 commit comments

Comments
 (0)