File tree Expand file tree Collapse file tree 3 files changed +79
-0
lines changed
Expand file tree Collapse file tree 3 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v3
15+
16+ - name : Set up JDK 17
17+ uses : actions/setup-java@v3
18+ with :
19+ distribution : temurin
20+ java-version : 17
21+
22+ - name : Build with Gradle
23+ run : ./gradlew build --stacktrace
Original file line number Diff line number Diff line change 1+ name : Generate from OpenAPI
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : " 0 0 * * 0" # weekly run (every Sunday at midnight)
7+
8+ jobs :
9+ generate :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Set up JDK 17
16+ uses : actions/setup-java@v3
17+ with :
18+ distribution : temurin
19+ java-version : 17
20+
21+ - name : Run Generator
22+ run : ./gradlew :generator:run
23+
24+ - name : Commit changes
25+ run : |
26+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
27+ git config --local user.name "github-actions[bot]"
28+ git add .
29+ git commit -m "chore: regenerate client from OpenAPI" || echo "No changes to commit"
30+ git push
Original file line number Diff line number Diff line change 1+ name : Publish to GitHub Packages
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write
13+
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Set up JDK 17
18+ uses : actions/setup-java@v3
19+ with :
20+ distribution : temurin
21+ java-version : 17
22+
23+ - name : Publish package
24+ run : ./gradlew publish
25+ env :
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments