1
1
# GitHub Action Workflow for building a new commit to the primary repo branch and publishing a new release to beta.
2
2
#
3
- # Workflow is triggered on pushes into master.
3
+ # Workflow is triggered on pushes. Beta publish job runs conditionally if pushed to master.
4
4
#
5
5
# Additional Docs:
6
6
# - GitHub Actions: https://help.github.com/en/actions
@@ -17,76 +17,27 @@ jobs:
17
17
name : Build
18
18
runs-on : codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
19
19
steps :
20
-
21
- # Check out current repository
22
- - name : Fetch Sources
23
- uses : actions/checkout@v2
24
-
25
- - name : Setup JDK
26
- uses : actions/setup-java@v3
20
+ - uses : actions/checkout@v4
21
+ - uses : actions/setup-java@v3
27
22
with :
28
23
distribution : ' corretto'
29
24
java-version : ' 17'
30
-
31
25
- uses : gradle/actions/setup-gradle@v4
32
26
33
- - run : df
34
27
# Build artifact using buildPlugin Gradle task
35
28
- name : Build Plugin
36
- run : ./gradlew buildPlugin
37
-
38
- - run : df
39
- - name : Get Product Versions
40
- id : get-products
41
- run : |
42
- PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')"
43
- echo "products=$PRODUCTS"
44
- echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT"
45
-
46
- outputs :
47
- products : ${{ steps.get-products.outputs.products }}
48
-
49
- verify :
50
- runs-on : codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
51
- needs : build
52
- strategy :
53
- fail-fast : false
54
- matrix :
55
- product : ${{ fromJSON(needs.build.outputs.products) }}
56
- steps :
57
- - run : df
58
- - uses : actions/checkout@v4
59
- - run : df
60
- - uses : actions/setup-java@v3
61
- with :
62
- distribution : ' corretto'
63
- java-version : ' 17'
64
- - run : df
29
+ run : ./gradlew build
65
30
66
- # Cache Gradle dependencies
67
- - name : Setup Gradle Dependencies Cache
68
- uses : actions/cache@v2
69
- with :
70
- path : ~/.gradle/caches
71
- key : ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
72
-
73
- # Cache Gradle Wrapper
74
- - name : Setup Gradle Wrapper Cache
75
- uses : actions/cache@v2
76
- with :
77
- path : ~/.gradle/wrapper
78
- key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
79
-
80
- - run : df
81
-
82
- # Don't set up gradle here. We've already verified the gradle wrapper in the previous job.
31
+ # Build artifact using buildPlugin Gradle task
32
+ - name : Build Plugin
33
+ run : ./gradlew buildPlugin
83
34
84
35
# Run intellij:verifyPlugin task.
85
36
- name : Verify Plugin
86
- run : ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}"
37
+ run : ./gradlew verifyPlugin
87
38
88
39
publish-beta :
89
- needs : verify
40
+ needs : build
90
41
runs-on : codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
91
42
if : github.repository == 'amazon-ion/ion-intellij-plugin'
92
43
steps :
0 commit comments