16
16
default : false
17
17
type : boolean
18
18
19
+ # Manual Trigger
20
+ workflow_dispatch :
19
21
env :
20
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-24.04
33
+ runs-on : ubuntu-latest
34
+ permissions :
35
+ checks : write
36
+ pull-requests : write
37
+ contents : write
38
+ issues : write
30
39
steps :
31
40
- name : Checkout Repository
32
- uses : actions/checkout@v4
41
+ uses : actions/checkout@v5
33
42
34
43
- name : Setup CommandBox
35
44
uses :
Ortus-Solutions/[email protected]
36
45
with :
37
46
forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
38
47
48
+ - name : Setup Java
49
+ uses : actions/setup-java@v5
50
+ with :
51
+ distribution : " temurin"
52
+ java-version : ${{ env.JDK }}
53
+
39
54
- name : " Setup Environment Variables For Build Process"
40
55
id : current_version
41
56
run : |
50
65
fi
51
66
52
67
- name : Update changelog [unreleased] with latest version
53
- uses : thomaseizinger/keep-a-changelog-new-release@1.3 .0
68
+ uses : thomaseizinger/keep-a-changelog-new-release@3.1 .0
54
69
if : env.SNAPSHOT == 'false'
55
70
with :
56
71
changelogPath : ./changelog.md
61
76
npm install -g markdownlint-cli
62
77
markdownlint changelog.md --fix
63
78
box install commandbox-docbox
64
- box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
79
+ box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }}
65
80
66
- - name : Commit Changelog To Master
81
+ - name : Commit Changelog [unreleased] with latest version
67
82
68
83
if : env.SNAPSHOT == 'false'
69
84
with :
@@ -118,7 +133,7 @@ jobs:
118
133
box forgebox publish --force
119
134
120
135
- name : Create Github Release
121
- uses : taiki-e/create-gh-release-action@v1.8.2
136
+ uses : taiki-e/create-gh-release-action@v1.9.1
122
137
continue-on-error : true
123
138
if : env.SNAPSHOT == 'false'
124
139
with :
@@ -127,18 +142,35 @@ jobs:
127
142
token : ${{ secrets.GITHUB_TOKEN }}
128
143
ref : refs/tags/v${{ env.VERSION }}
129
144
145
+ - name : Inform Slack
146
+ if : ${{ always() }}
147
+ uses : rtCamp/action-slack-notify@v2
148
+ env :
149
+ SLACK_CHANNEL : coding
150
+ SLACK_COLOR : ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
151
+ SLACK_ICON_EMOJI : " :bell:"
152
+ SLACK_MESSAGE : " Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!"
153
+ SLACK_TITLE : " ColdBox Module ${{ env.MODULE_ID }}"
154
+ SLACK_USERNAME : CI
155
+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
156
+
130
157
# #########################################################################################
131
158
# Prep Next Release
132
159
# #########################################################################################
133
160
prep_next_release :
134
161
name : Prep Next Release
135
162
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
136
- runs-on : ubuntu-24.04
163
+ runs-on : ubuntu-latest
137
164
needs : [ build ]
165
+ permissions :
166
+ checks : write
167
+ pull-requests : write
168
+ contents : write
169
+ issues : write
138
170
steps :
139
171
# Checkout development
140
172
- name : Checkout Repository
141
- uses : actions/checkout@v4
173
+ uses : actions/checkout@v5
142
174
with :
143
175
ref : development
144
176
@@ -148,7 +180,7 @@ jobs:
148
180
forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
149
181
150
182
- name : Download build artifacts
151
- uses : actions/download-artifact@v4
183
+ uses : actions/download-artifact@v5
152
184
with :
153
185
name : ${{ env.MODULE_ID }}
154
186
path : .tmp
0 commit comments