Introduce GitHub Actions workflow for publishing to JetBrains Marketp… #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to JetBrains Marketplace | |
| on: | |
| push: | |
| concurrency: | |
| group: publish-plugin-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| versions: | |
| name: Support Versions | |
| runs-on: arc-runners-small | |
| timeout-minutes: 10 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version-file: '.java-version' | |
| distribution: 'corretto' | |
| - name: Generate matrix from printProductsReleases | |
| id: set-matrix | |
| run: | | |
| RAW=$(./gradlew printProductsReleases -Pintellij.type=PY --quiet \ | |
| | grep '^PY-' \ | |
| | sed 's/^PY-//') | |
| JSON=$(echo "$RAW" | jq -R . | jq -s -c '{version: .}') | |
| echo "Versions: $RAW" | |
| echo "matrix=$JSON" >> $GITHUB_OUTPUT | |
| test: | |
| name: Run Tests | |
| needs: versions | |
| runs-on: arc-runners-small | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: ${{ fromJson(needs.versions.outputs.matrix) }} | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version-file: '.java-version' | |
| distribution: 'corretto' | |
| - name: Run Tests | |
| run: | | |
| ./gradlew test --no-daemon | |
| env: | |
| PLATFORM_VERSION: ${{ matrix.version }} | |
| COMPATIBLE_PLUGINS: '' # FIXME: It's fix for EAP version IDE | |
| verify: | |
| name: Verify Plugin | |
| runs-on: arc-runners-small | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version-file: '.java-version' | |
| distribution: 'corretto' | |
| - name: Verify Plugin | |
| run: | | |
| ./gradlew verifyPlugin --no-daemon | |
| # publish: | |
| # name: Publish Plugin | |
| # if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| # runs-on: arc-runners-small | |
| # needs: | |
| # - test | |
| # - verify | |
| # timeout-minutes: 10 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # | |
| # - uses: actions/setup-java@v4 | |
| # with: | |
| # java-version-file: '.java-version' | |
| # distribution: 'corretto' | |
| # | |
| # - name: Publish Plugin | |
| # run: | | |
| # ./gradlew publishPlugin --no-daemon | |
| # env: | |
| # JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }} |