16
16
default : false
17
17
type : boolean
18
18
19
+ # Manual Trigger
20
+ workflow_dispatch :
19
21
env :
20
- MODULE_ID : cbdebugger
22
+ MODULE_ID : ${{ github.event.repository.name }}
23
+ JDK : 21
21
24
SNAPSHOT : ${{ inputs.snapshot || false }}
25
+ BUILD_ID : ${{ github.run_number }}
22
26
23
27
jobs :
24
28
# #########################################################################################
25
29
# Build & Publish
26
30
# #########################################################################################
27
31
build :
28
32
name : Build & Publish
29
- runs-on : ubuntu-20.04
33
+ runs-on : ubuntu-24.04
34
+ permissions :
35
+ checks : write
36
+ pull-requests : write
37
+ contents : write
38
+ issues : write
30
39
steps :
31
40
- name : Checkout Repository
32
41
uses : actions/checkout@v4
41
50
with :
42
51
forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
43
52
53
+ - name : Setup Java
54
+ uses : actions/setup-java@v4
55
+ with :
56
+ distribution : " temurin"
57
+ java-version : ${{ env.JDK }}
58
+
44
59
- name : " Setup Environment Variables For Build Process"
45
60
id : current_version
46
61
run : |
55
70
fi
56
71
57
72
- name : Update changelog [unreleased] with latest version
58
- uses : thomaseizinger/keep-a-changelog-new-release@1.3 .0
73
+ uses : thomaseizinger/keep-a-changelog-new-release@3.1 .0
59
74
if : env.SNAPSHOT == 'false'
60
75
with :
61
76
changelogPath : ./changelog.md
@@ -69,10 +84,10 @@ jobs:
69
84
npm install -g markdownlint-cli
70
85
markdownlint changelog.md --fix
71
86
box install commandbox-docbox
72
- box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
87
+ box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }}
73
88
74
- - name : Commit Changelog To Master
75
-
89
+ - name : Commit Changelog [unreleased] with latest version
90
+
76
91
if : env.SNAPSHOT == 'false'
77
92
with :
78
93
author_name : Github Actions
@@ -126,7 +141,7 @@ jobs:
126
141
box forgebox publish --force
127
142
128
143
- name : Create Github Release
129
-
144
+
130
145
continue-on-error : true
131
146
if : env.SNAPSHOT == 'false'
132
147
with :
@@ -135,14 +150,31 @@ jobs:
135
150
token : ${{ secrets.GITHUB_TOKEN }}
136
151
ref : refs/tags/v${{ env.VERSION }}
137
152
153
+ - name : Inform Slack
154
+ if : ${{ always() }}
155
+ uses : rtCamp/action-slack-notify@v2
156
+ env :
157
+ SLACK_CHANNEL : coding
158
+ SLACK_COLOR : ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
159
+ SLACK_ICON_EMOJI : " :bell:"
160
+ SLACK_MESSAGE : " Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!"
161
+ SLACK_TITLE : " ColdBox Module ${{ env.MODULE_ID }}"
162
+ SLACK_USERNAME : CI
163
+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
164
+
138
165
# #########################################################################################
139
166
# Prep Next Release
140
167
# #########################################################################################
141
168
prep_next_release :
142
169
name : Prep Next Release
143
170
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
144
- runs-on : ubuntu-20 .04
171
+ runs-on : ubuntu-24 .04
145
172
needs : [ build ]
173
+ permissions :
174
+ checks : write
175
+ pull-requests : write
176
+ contents : write
177
+ issues : write
146
178
steps :
147
179
# Checkout development
148
180
- name : Checkout Repository
@@ -173,7 +205,7 @@ jobs:
173
205
174
206
# Commit it back to development
175
207
- name : Commit Version Bump
176
-
208
+
177
209
with :
178
210
author_name : Github Actions
179
211
0 commit comments