1616 default : false
1717 type : boolean
1818
19+ # Manual Trigger
20+ workflow_dispatch :
1921env :
20- MODULE_ID : cbantisamy
22+ MODULE_ID : ${{ github.event.repository.name }}
23+ JDK : 21
2124 SNAPSHOT : ${{ inputs.snapshot || false }}
25+ BUILD_ID : ${{ github.run_number }}
2226
2327jobs :
2428 # #########################################################################################
2529 # Build & Publish
2630 # #########################################################################################
2731 build :
2832 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
3039 steps :
3140 - name : Checkout Repository
32- uses : actions/checkout@v3
41+ uses : actions/checkout@v4
3342
3443 - name : Setup CommandBox
3544 uses : Ortus-Solutions/setup-commandbox@v2.0.1
3645 with :
3746 forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
3847
48+ - name : Setup Java
49+ uses : actions/setup-java@v4
50+ with :
51+ distribution : " temurin"
52+ java-version : ${{ env.JDK }}
53+
3954 - name : " Setup Environment Variables For Build Process"
4055 id : current_version
4156 run : |
@@ -50,19 +65,21 @@ jobs:
5065 fi
5166
5267 - 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
5469 if : env.SNAPSHOT == 'false'
5570 with :
5671 changelogPath : ./changelog.md
5772 tag : v${{ env.VERSION }}
5873
5974 - name : Build ${{ env.MODULE_ID }}
6075 run : |
76+ npm install -g markdownlint-cli
77+ markdownlint changelog.md --fix
6178 box install commandbox-docbox
62- 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 }}
6380
64- - name : Commit Changelog To Master
65- uses : EndBug/add-and-commit@v9.1.1
81+ - name : Commit Changelog [unreleased] with latest version
82+ uses : EndBug/add-and-commit@v9.1.4
6683 if : env.SNAPSHOT == 'false'
6784 with :
6885 author_name : Github Actions
7188 add : changelog.md
7289
7390 - name : Tag Version
74- uses : rickstaa/action-create-tag@v1.6.1
91+ uses : rickstaa/action-create-tag@v1.7.2
7592 if : env.SNAPSHOT == 'false'
7693 with :
7794 tag : " v${{ env.VERSION }}"
8097
8198 - name : Upload Build Artifacts
8299 if : success()
83- uses : actions/upload-artifact@v3
100+ uses : actions/upload-artifact@v4
84101 with :
85102 name : ${{ env.MODULE_ID }}
86103 path : |
@@ -116,7 +133,7 @@ jobs:
116133 box forgebox publish --force
117134
118135 - name : Create Github Release
119- uses : taiki-e/create-gh-release-action@v1.6 .2
136+ uses : taiki-e/create-gh-release-action@v1.8 .2
120137 continue-on-error : true
121138 if : env.SNAPSHOT == 'false'
122139 with :
@@ -125,18 +142,35 @@ jobs:
125142 token : ${{ secrets.GITHUB_TOKEN }}
126143 ref : refs/tags/v${{ env.VERSION }}
127144
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+
128157 # #########################################################################################
129158 # Prep Next Release
130159 # #########################################################################################
131160 prep_next_release :
132161 name : Prep Next Release
133162 if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
134- runs-on : ubuntu-20 .04
163+ runs-on : ubuntu-24 .04
135164 needs : [ build ]
165+ permissions :
166+ checks : write
167+ pull-requests : write
168+ contents : write
169+ issues : write
136170 steps :
137171 # Checkout development
138172 - name : Checkout Repository
139- uses : actions/checkout@v3
173+ uses : actions/checkout@v4
140174 with :
141175 ref : development
142176
@@ -146,7 +180,7 @@ jobs:
146180 forgeboxAPIKey : ${{ secrets.FORGEBOX_TOKEN }}
147181
148182 - name : Download build artifacts
149- uses : actions/download-artifact@v2
183+ uses : actions/download-artifact@v4
150184 with :
151185 name : ${{ env.MODULE_ID }}
152186 path : .tmp
@@ -163,7 +197,7 @@ jobs:
163197
164198 # Commit it back to development
165199 - name : Commit Version Bump
166- uses : EndBug/add-and-commit@v9.1.1
200+ uses : EndBug/add-and-commit@v9.1.4
167201 with :
168202 author_name : Github Actions
169203 author_email : info@ortussolutions.com
0 commit comments