|
1 | | -# GitHub Actions Workflow is created for preparing the plugin release in the following steps: |
2 | | -# - Validate Gradle Wrapper. |
3 | | -# - Run 'verifyPlugin' task. |
4 | | -# - Run the 'buildPlugin' task and prepare artifact. |
5 | | -# - Run the 'runPluginVerifier' task. |
6 | | -# - Create a draft release. |
7 | | -# |
8 | | -# The workflow is triggered on push and pull_request events. |
9 | | -# |
10 | | -# GitHub Actions reference: https://help.github.com/en/actions |
11 | | -# |
12 | | -## JBIJPPTPL |
13 | | - |
14 | 1 | name: Build |
15 | 2 | on: |
16 | 3 | # Trigger the workflow on pushes to only the 'master' branch (this avoids duplicate checks being run e.g., for dependabot pull requests) |
|
32 | 19 | outputs: |
33 | 20 | version: ${{ steps.properties.outputs.version }} |
34 | 21 | changelog: ${{ steps.properties.outputs.changelog }} |
35 | | - pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} |
36 | 22 | steps: |
37 | 23 |
|
38 | 24 | # Check out the current repository |
|
66 | 52 | CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" |
67 | 53 |
|
68 | 54 | echo "version=$VERSION" >> $GITHUB_OUTPUT |
69 | | - echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT |
70 | 55 | |
71 | 56 | echo "changelog<<EOF" >> $GITHUB_OUTPUT |
72 | 57 | echo "$CHANGELOG" >> $GITHUB_OUTPUT |
@@ -94,62 +79,12 @@ jobs: |
94 | 79 | name: ${{ steps.artifact.outputs.filename }} |
95 | 80 | path: ./build/distributions/content/*/* |
96 | 81 |
|
97 | | - # Run plugin structure verification along with IntelliJ Plugin Verifier |
98 | | - verify: |
99 | | - name: Verify plugin |
100 | | - needs: [ build ] |
101 | | - runs-on: ubuntu-latest |
102 | | - steps: |
103 | | - |
104 | | - # Free GitHub Actions Environment Disk Space |
105 | | - - name: Maximize Build Space |
106 | | - uses: jlumbroso/free-disk-space@main |
107 | | - with: |
108 | | - tool-cache: false |
109 | | - large-packages: false |
110 | | - |
111 | | - # Check out the current repository |
112 | | - - name: Fetch Sources |
113 | | - uses: actions/checkout@v4 |
114 | | - |
115 | | - # Set up Java environment for the next steps |
116 | | - - name: Setup Java |
117 | | - uses: actions/setup-java@v4 |
118 | | - with: |
119 | | - distribution: zulu |
120 | | - java-version: 17 |
121 | | - |
122 | | - # Setup Gradle |
123 | | - - name: Setup Gradle |
124 | | - uses: gradle/actions/setup-gradle@v3 |
125 | | - with: |
126 | | - gradle-home-cache-cleanup: true |
127 | | - |
128 | | - # Cache Plugin Verifier IDEs |
129 | | - - name: Setup Plugin Verifier IDEs Cache |
130 | | - uses: actions/cache@v4 |
131 | | - with: |
132 | | - path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides |
133 | | - key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} |
134 | | - |
135 | | - # Run Verify Plugin task and IntelliJ Plugin Verifier tool |
136 | | - - name: Run Plugin Verification tasks |
137 | | - run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} |
138 | | - |
139 | | - # Collect Plugin Verifier Result |
140 | | - - name: Collect Plugin Verifier Result |
141 | | - if: ${{ always() }} |
142 | | - uses: actions/upload-artifact@v4 |
143 | | - with: |
144 | | - name: pluginVerifier-result |
145 | | - path: ${{ github.workspace }}/build/reports/pluginVerifier |
146 | | - |
147 | 82 | # Prepare a draft release for GitHub Releases page for the manual verification |
148 | 83 | # If accepted and published, release workflow would be triggered |
149 | 84 | releaseDraft: |
150 | 85 | name: Release draft |
151 | 86 | if: github.event_name != 'pull_request' |
152 | | - needs: [ build, verify ] |
| 87 | + needs: [ build ] |
153 | 88 | runs-on: ubuntu-latest |
154 | 89 | permissions: |
155 | 90 | contents: write |
|
0 commit comments