Build PyCharm Plugin #8
Workflow file for this run
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: Build PyCharm Plugin | |
| on: | |
| release: | |
| types: [created, published] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/gradle-build-action@v2 | |
| - name: Build plugin | |
| run: | | |
| cd ide-plugins | |
| ./gradlew buildPlugin | |
| - name: Get plugin version | |
| id: plugin_version | |
| run: | | |
| cd ide-plugins | |
| VERSION=$(grep "^version" build.gradle.kts | cut -d'"' -f2) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Upload plugin artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: picocode-plugin-${{ steps.plugin_version.outputs.version }} | |
| path: plugin/build/distributions/*.zip | |
| - name: Upload to Release | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: plugin/build/distributions/*.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |