Changesets · Branches · Tags · Compare
| Changeset | a62a835baa952bcbf79c3115c50ae4bdf31764fb97b3bf79008bbc8ca26cc984 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-08-07 11:56 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-07 11:56 -07:00 |
| Parents | 86c0897ca866 |
1 file changed
modified .github/workflows/jetbrains-release.yaml +78 −49
| @@ -9,10 +9,18 @@ | ||
| 9 | 9 | types: [prereleased] |
| 10 | 10 | workflow_dispatch: |
| 11 | 11 | inputs: |
| 12 | - publish_build: | |
| 13 | - description: "Whether or not to publish the built extension to the JetBrains marketplace" | |
| 12 | + build_only: | |
| 13 | + description: "If true, only build the extension for the given channels, don't publish" | |
| 14 | 14 | required: true |
| 15 | - default: false | |
| 15 | + default: "true" | |
| 16 | + eap_channel: | |
| 17 | + description: "If true, build/publish the extension to the EAP channel" | |
| 18 | + required: true | |
| 19 | + default: "true" | |
| 20 | + stable_channel: | |
| 21 | + description: "If true, build/publish the extension to the Stable channel" | |
| 22 | + required: true | |
| 23 | + default: "true" | |
| 16 | 24 | |
| 17 | 25 | defaults: |
| 18 | 26 | run: |
| @@ -37,50 +45,50 @@ | ||
| 37 | 45 | echo "should_run=false" >> $GITHUB_OUTPUT |
| 38 | 46 | fi |
| 39 | 47 | |
| 40 | - bump-version: | |
| 41 | - runs-on: ubuntu-latest | |
| 42 | - needs: | |
| 43 | - - check_release_name | |
| 44 | - if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true' | |
| 45 | - permissions: | |
| 46 | - contents: write | |
| 47 | - pull-requests: write | |
| 48 | - steps: | |
| 49 | - # 0. Setup git | |
| 50 | - - name: Checkout | |
| 51 | - uses: actions/checkout@v4 | |
| 52 | - | |
| 53 | - - name: Set up Git | |
| 54 | - run: | | |
| 55 | - git config --local user.email "action@github.com" | |
| 56 | - git config --local user.name "GitHub Action" | |
| 57 | - | |
| 58 | - - name: Create PR branch | |
| 59 | - run: | | |
| 60 | - BRANCH_NAME="chore/bump-jetbrains-version-$(date +%Y%m%d-%H%M%S)" | |
| 61 | - git checkout -b $BRANCH_NAME | |
| 62 | - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
| 63 | - | |
| 64 | - - name: Bump version in gradle.properties | |
| 65 | - run: | | |
| 66 | - awk '/pluginVersion=/{split($0,a,"="); split(a[2],b,"."); b[3]+=1; printf "%s=%s.%s.%s\n",a[1],b[1],b[2],b[3];next}1' gradle.properties > tmp && mv tmp gradle.properties | |
| 67 | - rm -rf tmp | |
| 68 | - NEW_VERSION=$(grep 'pluginVersion=' gradle.properties | cut -d'=' -f2) | |
| 69 | - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | |
| 70 | - | |
| 71 | - - name: Create Pull Request | |
| 72 | - uses: peter-evans/create-pull-request@v7 | |
| 73 | - with: | |
| 74 | - token: ${{ secrets.CI_GITHUB_TOKEN }} | |
| 75 | - commit-message: "chore: bump jetbrains extension version to ${{ env.NEW_VERSION }}" | |
| 76 | - title: "chore: bump jetbrains extension version to ${{ env.NEW_VERSION }}" | |
| 77 | - body: | | |
| 78 | - Automated PR to bump the JetBrains extension version after successful pre-release publication. | |
| 79 | - | |
| 80 | - - Bumped version in extensions/intellij/gradle.properties to ${{ env.NEW_VERSION }} | |
| 81 | - branch: ${{ env.BRANCH_NAME }} | |
| 82 | - base: main | |
| 83 | - delete-branch: true | |
| 48 | + # bump-version: | |
| 49 | + # runs-on: ubuntu-latest | |
| 50 | + # needs: | |
| 51 | + # - check_release_name | |
| 52 | + # if: github.event_name != 'workflow_dispatch' || github.event.inputs.eap_channel == 'true' || github.event.inputs.stable_channel == 'true' | |
| 53 | + # permissions: | |
| 54 | + # contents: write | |
| 55 | + # pull-requests: write | |
| 56 | + # steps: | |
| 57 | + # # 0. Setup git | |
| 58 | + # - name: Checkout | |
| 59 | + # uses: actions/checkout@v4 | |
| 60 | + | |
| 61 | + # - name: Set up Git | |
| 62 | + # run: | | |
| 63 | + # git config --local user.email "action@github.com" | |
| 64 | + # git config --local user.name "GitHub Action" | |
| 65 | + | |
| 66 | + # - name: Create PR branch | |
| 67 | + # run: | | |
| 68 | + # BRANCH_NAME="chore/bump-jetbrains-version-$(date +%Y%m%d-%H%M%S)" | |
| 69 | + # git checkout -b $BRANCH_NAME | |
| 70 | + # echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
| 71 | + | |
| 72 | + # - name: Bump version in gradle.properties | |
| 73 | + # run: | | |
| 74 | + # awk '/pluginVersion=/{split($0,a,"="); split(a[2],b,"."); b[3]+=1; printf "%s=%s.%s.%s\n",a[1],b[1],b[2],b[3];next}1' gradle.properties > tmp && mv tmp gradle.properties | |
| 75 | + # rm -rf tmp | |
| 76 | + # NEW_VERSION=$(grep 'pluginVersion=' gradle.properties | cut -d'=' -f2) | |
| 77 | + # echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | |
| 78 | + | |
| 79 | + # - name: Create Pull Request | |
| 80 | + # uses: peter-evans/create-pull-request@v7 | |
| 81 | + # with: | |
| 82 | + # token: ${{ secrets.CI_GITHUB_TOKEN }} | |
| 83 | + # commit-message: "chore: bump jetbrains extension version to ${{ env.NEW_VERSION }}" | |
| 84 | + # title: "chore: bump jetbrains extension version to ${{ env.NEW_VERSION }}" | |
| 85 | + # body: | | |
| 86 | + # Automated PR to bump the JetBrains extension version after successful pre-release publication. | |
| 87 | + | |
| 88 | + # - Bumped version in extensions/intellij/gradle.properties to ${{ env.NEW_VERSION }} | |
| 89 | + # branch: ${{ env.BRANCH_NAME }} | |
| 90 | + # base: main | |
| 91 | + # delete-branch: true | |
| 84 | 92 | |
| 85 | 93 | # Prepare and publish the plugin to JetBrains Marketplace repository |
| 86 | 94 | build: |
| @@ -223,9 +231,30 @@ | ||
| 223 | 231 | # apple-product-id: dev.continue.continue-binary |
| 224 | 232 | # options: --options runtime --entitlements entitlements.xml |
| 225 | 233 | |
| 234 | + # Build the plugin if not publishing | |
| 235 | + - name: Build EAP Plugin (no publish) | |
| 236 | + if: github.event_name != 'release' && github.event.inputs.eap_channel == 'true' && github.event.inputs.build_only == 'true' | |
| 237 | + env: | |
| 238 | + PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} | |
| 239 | + CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} | |
| 240 | + PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} | |
| 241 | + PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} | |
| 242 | + RELEASE_CHANNEL: eap | |
| 243 | + run: ./gradlew buildPlugin --info --stacktrace | |
| 244 | + | |
| 245 | + - name: Build Stable Plugin (no publish) | |
| 246 | + if: github.event_name != 'release' && github.event.inputs.stable_channel == 'true' && github.event.inputs.build_only == 'true' | |
| 247 | + env: | |
| 248 | + PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} | |
| 249 | + CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} | |
| 250 | + PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} | |
| 251 | + PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} | |
| 252 | + RELEASE_CHANNEL: default | |
| 253 | + run: ./gradlew buildPlugin --info --stacktrace | |
| 254 | + | |
| 226 | 255 | # Publish the plugin to JetBrains Marketplace |
| 227 | 256 | - name: Publish EAP Plugin |
| 228 | - if: github.event_name == 'release' || github.event.inputs.publish_build == 'true' | |
| 257 | + if: github.event_name == 'release' || (github.event.inputs.eap_channel == 'true' && github.event.inputs.build_only != 'true') | |
| 229 | 258 | env: |
| 230 | 259 | PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} |
| 231 | 260 | CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} |
| @@ -235,7 +264,7 @@ | ||
| 235 | 264 | run: ./gradlew publishPlugin --info --stacktrace |
| 236 | 265 | |
| 237 | 266 | - name: Publish Stable Plugin |
| 238 | - if: github.event_name == 'release' || github.event.inputs.publish_build == 'true' | |
| 267 | + if: github.event_name == 'release' || (github.event.inputs.stable_channel == 'true' && github.event.inputs.build_only != 'true') | |
| 239 | 268 | env: |
| 240 | 269 | PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} |
| 241 | 270 | CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} |