Skip to content

Commit 4627044

Browse files
committed
Use action-gh-release for model upload
1 parent 68b58c8 commit 4627044

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

‎.github/workflows/release-ocr-models.yml‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ jobs:
4545
find output/rec -maxdepth 1 -name "*.zip" -exec cp {} dist/ \;
4646
4747
- name: Replace release assets
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
files: dist/*
51+
tag_name: 'test-recognition-models'
4852
env:
49-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
run: |
51-
RELEASE_TAG="test-recognition-models"
52-
53-
# Delete all existing assets on the release
54-
gh release view "$RELEASE_TAG" --json assets --jq '.assets[].id' | \
55-
xargs -I{} gh api -X DELETE repos/${{ github.repository }}/releases/assets/{}
56-
57-
# Upload new artifacts
58-
gh release upload "$RELEASE_TAG" dist/* --clobber
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)