Skip to content

Commit d76758f

Browse files
committed
Support new versions with no limit
1 parent 068c3c4 commit d76758f

File tree

41 files changed

+153
-1177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+153
-1177
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,14 @@ on:
1414
- master
1515
jobs:
1616

17-
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
18-
gradleValidation:
19-
name: Gradle Wrapper
20-
runs-on: ubuntu-latest
21-
steps:
22-
23-
# Check out current repository
24-
- name: Fetch sources
25-
uses: actions/checkout@v2
26-
27-
# Validate wrapper
28-
- name: Gradle Wrapper Validation
29-
uses: gradle/wrapper-validation-action@v1
30-
3117
# Build and test plugin and provide artifact.
3218
build:
3319
name: Build
34-
needs: gradleValidation
3520
runs-on: ubuntu-latest
36-
strategy:
37-
fail-fast: false
38-
matrix:
39-
product: [ "IC-2023.1", "IC-2023.2", "IC-2023.3", "IC-2024.1", "IC-2024.2" ]
40-
max-parallel: 5
41-
env:
42-
PRODUCT_NAME: ${{ matrix.product }}
43-
outputs:
44-
name: ${{ steps.properties.outputs.name }}
45-
version: ${{ steps.properties.outputs.version }}
46-
artifact: ${{ steps.properties.outputs.artifact }}
4721
steps:
4822

23+
- run: df
24+
4925
# Check out current repository
5026
- name: Fetch Sources
5127
uses: actions/checkout@v2
@@ -56,6 +32,42 @@ jobs:
5632
distribution: 'corretto'
5733
java-version: '17'
5834

35+
- run: df
36+
- uses: gradle/actions/setup-gradle@v4
37+
38+
- run: df
39+
# Build artifact using buildPlugin Gradle task
40+
- name: Build Plugin
41+
run: ./gradlew buildPlugin
42+
43+
- run: df
44+
- name: Get Product Versions
45+
id: get-products
46+
run: |
47+
PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')"
48+
echo "products=$PRODUCTS"
49+
echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT"
50+
51+
outputs:
52+
products: ${{ steps.get-products.outputs.products }}
53+
54+
verify:
55+
runs-on: ubuntu-latest
56+
needs: build
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
product: ${{ fromJSON(needs.build.outputs.products) }}
61+
steps:
62+
- run: df
63+
- uses: actions/checkout@v4
64+
- run: df
65+
- uses: actions/setup-java@v3
66+
with:
67+
distribution: 'corretto'
68+
java-version: '17'
69+
- run: df
70+
5971
# Cache Gradle dependencies
6072
- name: Setup Gradle Dependencies Cache
6173
uses: actions/cache@v2
@@ -70,30 +82,27 @@ jobs:
7082
path: ~/.gradle/wrapper
7183
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
7284

73-
# Set environment variables
74-
- name: Export Properties
75-
id: properties
76-
shell: bash
77-
run: |
78-
PROPERTIES="$(./gradlew properties --console=plain -q)"
79-
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
80-
NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')"
81-
ARTIFACT="${NAME}-${VERSION}.zip"
82-
echo "::set-output name=version::$VERSION"
83-
echo "::set-output name=name::$NAME"
84-
echo "::set-output name=artifact::$ARTIFACT"
85+
- run: df
8586

86-
# Build artifact using buildPlugin Gradle task
87-
- name: Build Plugin
88-
run: ./gradlew buildPlugin
87+
# Don't set up gradle here. We've already verified the gradle wrapper in the previous job.
8988

9089
# Run intellij:verifyPlugin task.
9190
- name: Verify Plugin
92-
run: ./gradlew verifyPlugin
91+
run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}"
9392

93+
publish-beta:
94+
needs: verify
95+
runs-on: ubuntu-latest
96+
if: github.repository == 'amazon-ion/ion-intellij-plugin'
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-java@v3
100+
with:
101+
distribution: 'corretto'
102+
java-version: '17'
103+
- uses: gradle/actions/setup-gradle@v4
94104
# Publish plugin to beta channel
95105
- name: Publish Beta Plugin
96-
if: github.repository == 'amazon-ion/ion-intellij-plugin'
97106
env:
98107
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
99108
PUBLISH_CHANNEL: beta
@@ -104,5 +113,5 @@ jobs:
104113
if: github.repository == 'amazon-ion/ion-intellij-plugin'
105114
uses: actions/upload-artifact@v4
106115
with:
107-
name: ${{ matrix.product }}-plugin-artifact
108-
path: ./build/distributions/${{ needs.build.outputs.artifact }}
116+
name: plugin-artifact
117+
path: ./build/distributions/

.github/workflows/pr.yml

Lines changed: 30 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,10 @@ on:
1313
- '*.md'
1414
jobs:
1515

16-
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
17-
gradleValidation:
18-
name: Gradle Wrapper
19-
runs-on: ubuntu-latest
20-
steps:
21-
22-
# Check out current repository
23-
- name: Fetch sources
24-
uses: actions/checkout@v2
25-
26-
# Validate wrapper
27-
- name: Gradle Wrapper Validation
28-
uses: gradle/wrapper-validation-action@v1
29-
3016
# Build and test plugin and provide artifact.
3117
build:
3218
name: Build
33-
needs: gradleValidation
3419
runs-on: ubuntu-latest
35-
strategy:
36-
matrix:
37-
product: [ "IC-2023.1", "IC-2023.2", "IC-2023.3", "IC-2024.1", "IC-2024.2" ]
38-
max-parallel: 5
39-
env:
40-
PRODUCT_NAME: ${{ matrix.product }}
41-
outputs:
42-
name: ${{ steps.properties.outputs.name }}
43-
version: ${{ steps.properties.outputs.version }}
44-
artifact: ${{ steps.properties.outputs.artifact }}
4520
steps:
4621

4722
# Check out current repository
@@ -54,32 +29,9 @@ jobs:
5429
distribution: 'corretto'
5530
java-version: '17'
5631

57-
# Cache Gradle dependencies
58-
- name: Setup Gradle Dependencies Cache
59-
uses: actions/cache@v2
60-
with:
61-
path: ~/.gradle/caches
62-
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
63-
64-
# Cache Gradle Wrapper
65-
- name: Setup Gradle Wrapper Cache
66-
uses: actions/cache@v2
32+
- uses: gradle/actions/setup-gradle@v4
6733
with:
68-
path: ~/.gradle/wrapper
69-
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
70-
71-
# Set environment variables
72-
- name: Export Properties
73-
id: properties
74-
shell: bash
75-
run: |
76-
PROPERTIES="$(./gradlew properties --console=plain -q)"
77-
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
78-
NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')"
79-
ARTIFACT="${NAME}-${VERSION}.zip"
80-
echo "::set-output name=version::$VERSION"
81-
echo "::set-output name=name::$NAME"
82-
echo "::set-output name=artifact::$ARTIFACT"
34+
cache-disabled: true
8335

8436
# Build artifact using build Gradle task
8537
- name: Build
@@ -89,13 +41,33 @@ jobs:
8941
- name: Build Plugin
9042
run: ./gradlew buildPlugin
9143

92-
# Run intellij:verifyPlugin task.
93-
- name: Verify Plugin
94-
run: ./gradlew verifyPlugin
44+
- name: Get Product Versions
45+
id: get-products
46+
run: |
47+
PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')"
48+
echo "products=$PRODUCTS"
49+
echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT"
50+
51+
outputs:
52+
products: ${{ steps.get-products.outputs.products }}
9553

96-
# Upload plugin artifact to make it available in the next jobs
97-
- name: Upload artifact
98-
uses: actions/upload-artifact@v4
54+
verify:
55+
runs-on: ubuntu-latest
56+
needs: build
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
product: ${{ fromJSON(needs.build.outputs.products) }}
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v3
64+
with:
65+
distribution: 'corretto'
66+
java-version: '17'
67+
- uses: gradle/actions/setup-gradle@v4
9968
with:
100-
name: ${{ matrix.product }}-plugin-artifact
101-
path: ./build/distributions/${{ needs.build.outputs.artifact }}
69+
cache-read-only: true
70+
71+
# Run intellij:verifyPlugin task.
72+
- name: Verify Plugin
73+
run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}"

.github/workflows/release-eap.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ env:
1616

1717
jobs:
1818
release:
19-
strategy:
20-
matrix:
21-
product: [ "IC-2023.1", "IC-2023.2", "IC-2023.3", "IC-2024.1", "IC-2024.2" ]
22-
max-parallel: 1
23-
env:
24-
PRODUCT_NAME: ${{ matrix.product }}
2519
runs-on: ubuntu-latest
2620
steps:
2721
# Check out current repository
@@ -48,7 +42,6 @@ jobs:
4842

4943
- name: Publish Stable Plugin
5044
env:
51-
PRODUCT_NAME: ${{ matrix.product }}
5245
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
5346
PUBLISH_CHANNEL: release
5447
run: ./gradlew --stacktrace publishPlugin

0 commit comments

Comments
 (0)