Skip to content

Commit aa66f49

Browse files
dhuangnmdhuangnm
dhuangnm
authored and
dhuangnm
committed
use nm-actions for release build
1 parent bd0d80c commit aa66f49

File tree

2 files changed

+57
-19
lines changed

2 files changed

+57
-19
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build release wheel
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/*'
7+
8+
workflow_dispatch:
9+
inputs:
10+
gitref:
11+
description: "git tag, commit or branch name for the release"
12+
type: string
13+
required: true
14+
default: 'release/1.8
15+
16+
jobs:
17+
build-release-wheel:
18+
runs-on: ubuntu-20.04
19+
steps:
20+
- uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.10'
23+
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ inputs.gitref }}
28+
29+
- name: Build PyPi Wheel
30+
id: build
31+
uses: neuralmagic/nm-actions/actions/pypi_build@main
32+
with:
33+
dev: false
34+
release: true
35+
36+
- name: Set Env
37+
run: |
38+
pip3 install --upgrade pip && pip3 install --upgrade setuptools
39+
pip3 install virtualenv
40+
virtualenv venv
41+
source venv/bin/activate
42+
43+
- name: upload whl
44+
uses: actions/upload-artifact@v4
45+
if: success() || failure()
46+
with:
47+
name: "wheel-sparseml"
48+
path: ${{ steps.build.outputs.whlname }}
49+
retention-days: 7
50+
51+
- name: upload tar.gz
52+
uses: actions/upload-artifact@v4
53+
if: success() || failure()
54+
with:
55+
name: "tar-sparseml"
56+
path: ${{ steps.build.outputs.tarname }}
57+
retention-days: 7

.github/workflows/build-release.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)