19
19
uses : actions/checkout@v3
20
20
- name : Validate the Gradle Wrapper
21
21
22
+
22
23
build :
23
24
needs :
24
25
- validation
@@ -44,16 +45,16 @@ jobs:
44
45
45
46
with :
46
47
directory : " build/reports/jacoco"
47
- release :
48
+
49
+ release-and-delivery :
48
50
concurrency :
49
51
# Allow only one release at a time.
50
- group : release-${{ github.event.number || github.ref }}
52
+ group : release-and-delivery- ${{ github.event.number || github.ref }}
51
53
needs :
52
54
- build
53
55
runs-on : ubuntu-latest
54
56
outputs :
55
57
release-status : ${{ env.release_status }}
56
- release-version : ${{ env.release_version }}
57
58
# Release only where secrets are available.
58
59
if : >-
59
60
!github.event.repository.fork
@@ -62,80 +63,48 @@ jobs:
62
63
|| github.event.pull_request.head.repo.full_name == github.repository
63
64
)
64
65
steps :
65
- - name : Checkout the repository
66
- uses : actions/checkout@v3
67
- with :
68
- token : ${{ secrets.DEPLOYMENT_TOKEN }}
69
- submodules : recursive
70
- fetch-depth : 0
71
66
- name : Setup Node.js
72
67
uses : actions/setup-node@v3
73
68
with :
74
69
node-version : " lts/*"
75
- - name : Release
76
- env :
77
- GITHUB_TOKEN : ${{ secrets.DEPLOYMENT_TOKEN }}
78
- run : |
79
- npm install
80
- npx semantic-release
81
- docker-image-delivery :
82
- needs :
83
- - release
84
- runs-on : ubuntu-latest
85
- if : needs.release.outputs.release-status == 'released'
86
- env :
87
- REGISTRY : ghcr.io
88
- IMAGE_NAME : ${{ github.repository }}
89
- steps :
90
- - name : Checkout the repository
91
- uses : actions/checkout@v3
92
- with :
93
- submodules : recursive
94
- fetch-depth : 0
95
- - name : Login to GitHub Container registry
96
-
70
+ - name : Release and container delivery
71
+ uses :
SmartOperatingBlock/[email protected]
97
72
with :
98
- registry : ${{ env.REGISTRY }}
99
- username : ${{ github.actor }}
100
- password : ${{ secrets.GITHUB_TOKEN }}
101
- - id : full-image-name
102
- run : echo "image-name=${{env.REGISTRY}}/${{env.IMAGE_NAME}}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_OUTPUT
103
- - name : Build and push the image to GitHub Container registry
104
-
105
- with :
106
- context : .
107
- push : true
108
- tags : ${{ steps.full-image-name.outputs.image-name }}:latest, ${{ steps.full-image-name.outputs.image-name }}:${{ needs.release.outputs.release-version }}
73
+ should-release : true
74
+ release-command : |
75
+ npm install
76
+ npx semantic-release
77
+ should-build-and-deliver-container : true
78
+ container-registry-name : ' ghcr.io'
79
+ container-registry-username : ${{ github.actor }}
80
+ container-registry-password : ${{ secrets.GITHUB_TOKEN }}
81
+ github-token : ${{ secrets.DEPLOYMENT_TOKEN }}
82
+
109
83
documentation-deploy :
110
84
needs :
111
- - release
85
+ - release-and-delivery
112
86
runs-on : ubuntu-latest
113
- # Update documentation only when there is a new release
114
- if : needs.release.outputs.release-status == 'released'
87
+ if : needs.release-and-delivery.outputs.release-status == 'released'
115
88
steps :
116
89
- name : Checkout the repository
117
90
uses : actions/checkout@v3
118
91
with :
119
92
submodules : recursive
120
93
fetch-depth : 0
121
- - name : Generate Documentation
122
- run : ./gradlew dokkaHtml
123
- - name : Deploy documentation on GitHub Pages
124
- uses : peaceiris/actions-gh-pages@v3
94
+ - name : Generate and deploy documentation
95
+ uses :
SmartOperatingBlock/[email protected]
125
96
with :
126
- github_token : ${{ secrets.GITHUB_TOKEN }}
127
- keep_files : true
128
- publish_dir : ./build/dokka/html
129
- destination_dir : kdoc
130
- user_name : ' github-actions[bot]'
131
- user_email : ' github-actions[bot]@users.noreply.github.com'
132
- commit_message : ' docs: update documentation'
97
+ should-generate-code-documentation : true
98
+ code-documentation-generation-command : ./gradlew dokkaHtml
99
+ code-documentation-dst-folder : ' ./build/dokka/html'
100
+ code-documentation-site-folder : ' documentation/code-doc'
101
+ github-token : ${{ secrets.GITHUB_TOKEN }}
102
+
133
103
success :
134
- runs-on : ubuntu-22.04
104
+ runs-on : ubuntu-latest
135
105
needs :
136
106
- build
137
- - release
138
- - docker-image-delivery
107
+ - release-and-delivery
139
108
- documentation-deploy
140
109
if : >-
141
110
always() && (
0 commit comments