File tree Expand file tree Collapse file tree 7 files changed +98
-22
lines changed
Expand file tree Collapse file tree 7 files changed +98
-22
lines changed Original file line number Diff line number Diff line change 11name : Build module
22on :
33 workflow_call :
4- workflow_dispatch :
4+ outputs :
5+ module-version :
6+ value : ${{ jobs.build.outputs.module-version }}
57jobs :
68 build :
79 runs-on : windows-latest
10+ outputs :
11+ module-version : ${{ steps.module-version.outputs.module-version }}
812 steps :
9- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 .2.2
10- - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # 4.7.1
13+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4 .2.2
14+ - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # 4.7.1
1115 with :
1216 distribution : ' adopt'
1317 java-version : ' 21'
14- - uses : gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # 4.3.1
18+ - uses : gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # 4.3.1
1519 - name : Define MODULE_VERSION
20+ id : module-version
1621 run : |
1722 $env:MODULE_VERSION=$(./gradlew -q printModuleVersion)
1823 echo ("MODULE_VERSION=" + $env:MODULE_VERSION) >> $env:GITHUB_ENV
24+ echo "module-version=$env:MODULE_VERSION" >> $GITHUB_OUTPUT
1925 env :
2026 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2127 - name : " Detected module version"
2430 run : ./gradlew buildModule
2531 env :
2632 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27- - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 .6.2
33+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4 .6.2
2834 with :
29- name : PushNotifications-${{ env.MODULE_VERSION }}.mpk
35+ name : module
3036 path : module/dist/PushNotifications-${{ env.MODULE_VERSION }}.mpk
3137 compression-level : 0
Original file line number Diff line number Diff line change 11name : Build widget
22on :
33 workflow_call :
4- workflow_dispatch :
4+ outputs :
5+ widget-version :
6+ value : ${{ jobs.build.outputs.output1 }}
57defaults :
68 run :
79 working-directory : ./widget
810jobs :
911 build :
1012 runs-on : ubuntu-latest
13+ outputs :
14+ widget-version : ${{ steps.widget-version.outputs.widget-version }}
1115 steps :
12- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 .2.2
13- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4 .3.0
16+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4 .2.2
17+ - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # 4 .3.0
1418 with :
1519 node-version : 6
1620 cache : " npm"
1721 cache-dependency-path : widget/package-lock.json
22+ - name : Define WIDGET_VERSION
23+ id : widget-version
24+ working-directory : widget
25+ run : |
26+ WIDGET_VERSION=$(node --print 'require("./package.json").version')
27+ echo ("WIDGET_VERSION=" + $WIDGET_VERSION) >> $env:GITHUB_ENV
28+ echo "widget-version=$env:WIDGET_VERSION" >> $GITHUB_OUTPUT
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1831 - name : " Install dependencies"
1932 run : npm install
2033 - name : " Build widget"
2134 run : npm run build
22- - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 .6.2
35+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4 .6.2
2336 with :
24- name : MxPushNotifications.mpk
37+ name : widget
2538 path : widget/dist/MxPushNotifications.mpk
2639 compression-level : 0
Original file line number Diff line number Diff line change 55 publish :
66 runs-on : ubuntu-latest
77 steps :
8- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 .2.2
8+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4 .2.2
99 with :
1010 repository : ' mendixlabs/mendix-gradle-plugin'
1111 ref : ' 114bde309b52b037583d95a9beffee18eb71b65f'
1212 ssh-key : ${{ secrets.MENDIX_GRADLE_PLUGIN_SSH }}
1313 ssh-strict : false
14- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 .2.2
14+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4 .2.2
1515 with :
1616 path : repo
1717 sparse-checkout : .github/gradle
1818 - run : cp repo/.github/gradle/publish-mendix-gradle-plugin.gradle ./
19- - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # 4.7.1
19+ - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # 4.7.1
2020 with :
2121 distribution : ' adopt'
2222 java-version : ' 21'
23- - uses : gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # 4.3.1
23+ - uses : gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # 4.3.1
2424 - name : Build mendix-gradle-plugin
2525 run : |
2626 echo "kotlin.jvm.target.validation.mode = IGNORE" >> gradle.properties
Original file line number Diff line number Diff line change 11name : Push to stable branch
2-
32on :
43 push :
5- branches : [ "master", "mx8" ]
6-
4+ branches :
5+ - " master"
6+ - " mx8"
77jobs :
88 snyk :
99 uses : ./.github/workflows/snyk.yml
Original file line number Diff line number Diff line change 1+ name : Create release draft
2+ on :
3+ push :
4+ branches :
5+ - master
6+ - mx8
7+ - compliance
8+ tags :
9+ - v*.*.*
10+ jobs :
11+ build-module :
12+ uses : ./.github/workflows/build-module.yml
13+ secrets : inherit
14+ build-widget :
15+ uses : ./.github/workflows/build-widget.yml
16+ secrets : inherit
17+ checks :
18+ runs-on : ubuntu-latest
19+ needs :
20+ - build-module
21+ - build-widget
22+ if : ${{ needs.build-module.outputs.module-version != needs.build-widget.outputs.widget-version }}
23+ steps :
24+ - run : |
25+ echo "Module version (${{ needs.build-module.outputs.module-version }}) and widget version ${{ needs.build-widget.outputs.widget-version }}) do not match"
26+ exit 1
27+ - uses : trstringer/manual-approval@662b3ddbc7685f897992051e87e1b4b58c07dc03 # 1.9.1
28+ with :
29+ secret : ${{ github.TOKEN }}
30+ approvers : ui-addons
31+ minimum-approvals : 1
32+ issue-title : " Prepare documentation"
33+ issue-body : " Is the documentation for this release prepared?"
34+ download-artifacts :
35+ runs-on : ubuntu-latest
36+ needs :
37+ - build-module
38+ - build-widget
39+ steps :
40+ - uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
41+ with :
42+ name : module
43+ - uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
44+ with :
45+ name : widget
46+ create-draft-release :
47+ needs :
48+ - checks
49+ - download-artifacts
50+ runs-on : ubuntu-latest
51+ steps :
52+ - uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # 2.2.1
53+ with :
54+ body_path : CHANGELOG.md
55+ draft : true
56+ files : " *.mpk"
57+ fail_on_unmatched_files : true
58+ generate_release_notes : false
59+ make_latest : ${{ github.ref_name == 'master' }}
Original file line number Diff line number Diff line change 11name : Run Snyk scans
2-
32on :
43 workflow_call :
54 inputs :
1110 type : string
1211 required : false
1312 workflow_dispatch :
14-
1513jobs :
16- snyk-test- gradle :
14+ gradle :
1715 runs-on : ubuntu-latest
1816 steps :
19- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 .2.2
17+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4 .2.2
2018 - name : Run Snyk to check for vulnerabilities
2119 uses : snyk/actions/gradle@b98d498629f1c368650224d6d212bf7dfa89e4bf # 0.4.0
2220 env :
You can’t perform that action at this time.
0 commit comments