MH0386 commited on
Commit
11b58f7
·
verified ·
1 Parent(s): b380004

Add HuggingFace tagging job to release workflow

Browse files

Added a new job to tag HuggingFace Space upon release.

Files changed (1) hide show
  1. .github/workflows/release.yaml +21 -0
.github/workflows/release.yaml CHANGED
@@ -28,6 +28,27 @@ jobs:
28
  uses: pypa/gh-action-pypi-publish@release/v1
29
  with:
30
  packages-dir: dist/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  image:
32
  name: Release Image
33
  needs: pypi
 
28
  uses: pypa/gh-action-pypi-publish@release/v1
29
  with:
30
  packages-dir: dist/
31
+ huggingface:
32
+ name: Tag HuggingFace Space
33
+ runs-on: ubuntu-latest
34
+ permissions:
35
+ contents: read
36
+ id-token: write
37
+ environment:
38
+ name: huggingface
39
+ url: https://huggingface.co/spaces/${{github.repository}}/tree/${{github.event.release.tag_name}}
40
+ steps:
41
+ - name: Install uv
42
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
43
+ with:
44
+ enable-cache: true
45
+ activate-environment: true
46
+ - name: Push to HF
47
+ env:
48
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
49
+ run: >-
50
+ uvx hf repo tag create ${{github.repository}} ${{github.event.release.tag_name}}
51
+ --repo-type space
52
  image:
53
  name: Release Image
54
  needs: pypi