File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 55  workflow_call :
66    inputs :
77      version :
8-         description : " Release version as 'X .Y.Z'" 
8+         description : " Release version as 'vX .Y.Z'" 
99        type : string 
1010        required : true 
1111#  Can be called manually
1212  workflow_dispatch :
1313    inputs :
1414      version :
15-         description : " Release version as 'X .Y.Z'" 
15+         description : " Release version as 'vX .Y.Z'" 
1616        type : string 
1717        required : true 
1818
4343        with :
4444          file : HTML-doc-ansys-dpf-core.zip 
4545          token : ${{ secrets.GITHUB_TOKEN }} 
46-           version : tags/v ${{ inputs.version }} 
46+           version : tags/${{ inputs.version }} 
4747
4848      - name : " Extract ipynb examples" 
4949        shell : python 
Original file line number Diff line number Diff line change 2222
2323jobs :
2424
25+   get_latest_tag :
26+     name : " Get latest release version tag" 
27+     runs-on : ubuntu-latest 
28+     outputs :
29+       version : ${{ steps.step1.outputs.version }} 
30+     steps :
31+       - id : step1 
32+         name : " Get version tag" 
33+         shell : bash 
34+         run : | 
35+           get_latest_release() { 
36+             curl --silent "https://api.github.com/repos/$1/releases/latest" | 
37+               grep '"tag_name":' | 
38+               sed -E 's/.*"([^"]+)".*/\1/' 
39+           } 
40+           version=$(get_latest_release "ansys/pydpf-core") 
41+           echo $version 
42+           echo "version=$version" >> "$GITHUB_OUTPUT" 
43+ 
2544Publish_to_PyPI :
2645    name : " Publish Release to PyPI" 
2746    runs-on : ubuntu-latest 
47+     needs : get_latest_tag 
2848    steps :
2949      - name : " Download Release Assets" 
30503151        with :
32-           tag : ${{ github.event.inputs.release_tag || 'latest'  }} 
52+           tag : ${{ github.event.inputs.release_tag || needs.get_latest_tag.outputs.version  }} 
3353          fileName : " *.whl" 
3454          tarBall : false 
3555          zipBall : false 
5575        with :
5676          file : HTML-doc-ansys-dpf-core.zip 
5777          token : ${{ secrets.GITHUB_TOKEN }} 
78+           version : tags/${{ github.event.inputs.release_tag || needs.get_latest_tag.outputs.version }} 
5879
5980      - name : " List downloaded assets" 
6081        shell : bash 
@@ -111,6 +132,7 @@ jobs:
111132
112133  update_ansys_lab_examples :
113134    uses : ./.github/workflows/ansys_lab.yml 
135+     needs : get_latest_tag 
114136    with :
115-       version : ${{ github.event.inputs.release_tag || 'latest'  }} 
137+       version : ${{ github.event.inputs.release_tag || needs.get_latest_tag.outputs.version  }} 
116138    secrets : inherit 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments