File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+ jobs :
7+ build-and-upload :
8+ runs-on : linux-aarch64-a3-2
9+ container :
10+ image : swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.3.rc1-a3-ubuntu22.04-py3.11
11+ steps :
12+ - name : Clean git config
13+ run : |
14+ CONFIG_KEY='http.https://gh-proxy.test.osinfra.cn/.extraheader'
15+ git config --global --unset "$CONFIG_KEY" || true
16+
17+ - name : Clean workspace
18+ run : |
19+ sudo rm -rf --one-file-system "$GITHUB_WORKSPACE"/* "$GITHUB_WORKSPACE"/.* 2>/dev/null || true
20+
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+ with :
24+ clean : true
25+
26+ - name : Build wheel packages
27+ run : bash build.sh
28+
29+ - name : Upload wheel to release
30+ run : |
31+ cd ./output
32+ for whl in *.whl; do
33+ if [[ -f "$whl" ]]; then
34+ echo "Uploading $whl..."
35+ asset_name="$whl"
36+ curl -sL \
37+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
38+ -H "Content-Type: application/octet-stream" \
39+ --data-binary @"$whl" \
40+ "${{ github.event.release.upload_url }}"?name=$asset_name
41+ fi
42+ done
43+ shell : bash
You can’t perform that action at this time.
0 commit comments