Skip to content

Commit d7ba1d0

Browse files
committed
fix release tag
1 parent 1314028 commit d7ba1d0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
include:
1919
- os: ubuntu
2020
platform: linux
21+
target: x86_64
2122
- os: ubuntu
2223
platform: linux
2324
target: aarch64
@@ -88,8 +89,7 @@ jobs:
8889

8990
Release:
9091
needs: [ build, build_sdist ]
91-
# if: success() && startsWith(github.ref, 'refs/tags/')
92-
if: ${{ needs.build.result == 'success' && needs.build_sdist.result == 'success' }}
92+
if: ${{ needs.build.result == 'success' && needs.build_sdist.result == 'success' }} && startsWith(github.ref, 'refs/tags/')
9393
runs-on: ubuntu-latest
9494

9595
steps:
@@ -119,9 +119,18 @@ jobs:
119119
[[ "${GITHUB_REF#refs/tags/}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
120120
|| echo ::set-output name=prerelease::true
121121
122+
- name: Set tag
123+
# get tag from file name graph_ml-0.1.tar.gz
124+
id: set-tag
125+
run: |
126+
echo ::set-output name=tag::$(ls dist/*.tar.gz | sed -n 's/.*graph_ml-\(.*\).tar.gz/\1/p')
127+
122128
- name: Create Release
123129
uses: ncipollo/release-action@v1
124130
with:
125131
artifacts: "dist/*"
126132
token: ${{ secrets.GITHUB_TOKEN }}
127-
draft: false
133+
draft: false
134+
tag: ${{ steps.set-tag.outputs.tag }}
135+
skipIfReleaseExists: false
136+
replacesArtifacts: true

0 commit comments

Comments
 (0)