File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create releases 
2+ on :
3+   schedule :
4+     - cron : ' 0 5 * * *' #  every day at 5am UTC
5+   push :
6+     branches :
7+       - main 
8+ 
9+ jobs :
10+   release :
11+     name : release 
12+     if : github.ref == 'refs/heads/main' && github.repository == 'openai/openai-java' 
13+     runs-on : ubuntu-latest 
14+     environment : publish 
15+ 
16+     steps :
17+       - uses : actions/checkout@v4 
18+ 
19+       - uses : stainless-api/trigger-release-please@v1 
20+         id : release 
21+         with :
22+           repo : ${{ github.event.repository.full_name }} 
23+           stainless-api-key : ${{ secrets.STAINLESS_API_KEY }} 
24+ 
25+       - name : Set up Java 
26+         if : ${{ steps.release.outputs.releases_created }} 
27+         uses : actions/setup-java@v3 
28+         with :
29+           distribution : temurin 
30+           java-version : | 
31+             8 
32+             17 
33+ cache : gradle 
34+ 
35+       - name : Set up Gradle 
36+         if : ${{ steps.release.outputs.releases_created }} 
37+         uses : gradle/gradle-build-action@v2 
38+ 
39+       - name : Publish to Sonatype 
40+         if : ${{ steps.release.outputs.releases_created }} 
41+         run : |- 
42+           export -- GPG_SIGNING_KEY_ID 
43+           printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD" 
44+           GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')" 
45+           ./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" 
46+ env :
47+           SONATYPE_USERNAME : ${{ secrets.OPENAI_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }} 
48+           SONATYPE_PASSWORD : ${{ secrets.OPENAI_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }} 
49+           GPG_SIGNING_KEY : ${{ secrets.OPENAI_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }} 
50+           GPG_SIGNING_PASSWORD : ${{ secrets.OPENAI_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments