diff --git a/.github/workflows/mnn_release.yml b/.github/workflows/mnn_release.yml index eb033918e..91c6839b3 100644 --- a/.github/workflows/mnn_release.yml +++ b/.github/workflows/mnn_release.yml @@ -15,7 +15,14 @@ jobs: steps: - name: get-version id: get_version - run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + run: | + if [[ "${GITHUB_REF}" == refs/tags/* ]]; then + # 提取标签版本号 + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + else + # 如果不是标签,则设置版本为 'dev' + echo "VERSION=dev" >> $GITHUB_OUTPUT + fi linux-release: needs: [setup] diff --git a/.github/workflows/pymnn_release.yml b/.github/workflows/pymnn_release.yml index c04ddf5ae..f7f6311a1 100644 --- a/.github/workflows/pymnn_release.yml +++ b/.github/workflows/pymnn_release.yml @@ -69,7 +69,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: artifact-${{ matrix.arch }}-${{ matrix.arch }} + name: artifact-${{ matrix.os }}-${{ matrix.arch }} path: wheelhouse/*.whl publish_wheels: