File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2727        uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa  #  v2.12.0
2828        with :
2929          arguments : sourcesJar javadocJar 
30+       - name : Get tag 
31+         shell : bash 
32+         id : get_tag 
33+         run : | 
34+           TAG=${GITHUB_REF#refs/tags/} 
35+           echo "Github tag: $TAG" 
36+           echo "gh_tag=${TAG#v}" >> "$GITHUB_OUTPUT" 
3037       - name : Publish to MavenCentral 
3138        uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa  #  v2.12.0
3239        with :
3845          SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }} 
3946          SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }} 
4047          SIGNING_KEY : ${{ secrets.SIGNING_KEY }} 
48+           GH_TAG : " ${{ steps.get_tag.outputs.gh_tag }}" 
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ allprojects {
1313    group =  ' com.getyourguide.openapi.validation' 
1414    description =  ' OpenAPI Validation library' 
1515    //  Use version from GitHub tag if provided, otherwise use default version
16-     version =  project . hasProperty( ' gh_tag '  ) ?  project . property( ' gh_tag '  ). replaceFirst(' ^v'  , ' '  ) :  ' 0-SNAPSHOT' 
16+     version =  System . getenv( ' GH_TAG '  ) ?  System . getenv( ' GH_TAG '  ). replaceFirst(' ^v'  , ' '  ) :  ' 0-SNAPSHOT' 
1717
1818    java {
1919        toolchain {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments