Skip to content

Commit

Permalink
Allow the plugin to be released through github actions. (#137)
Browse files Browse the repository at this point in the history
* append change log to the release.

* improve github release action.
  • Loading branch information
aoli-al authored Feb 26, 2025
1 parent a2086db commit 4c3b368
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ jobs:
env:
GRADLE_PUBLISH_KEY: ${{secrets.GRADLE_PUBLISH_KEY}}
GRADLE_PUBLISH_SECRET: ${{secrets.GRADLE_PUBLISH_SECRET}}
- name: Publish to Intellij Marketplace
if: runner.os == 'Linux'
run: ./gradlew publishPlugin -Pversion=$VERSION
env:
ORG_GRADLE_PROJECT_intellijPlatformPublishingToken: ${{secrets.ORG_GRADLE_PROJECT_intellijPlatformPublishingToken}}
- name: Get changelog
id: get-changelog
if: runner.os == 'Linux'
run: |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
./gradlew getChangelog --console=plain -q --no-header --no-summary >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: actions/create-release@v1
if: runner.os == 'Linux'
env:
Expand All @@ -63,11 +75,8 @@ jobs:
tag_name: ${{ env.VERSION }}
release_name: "Release ${{ env.VERSION }}"
body: |
This release includes the following:
- Version: `${{ env.VERSION }}`
- Published packages are available in Maven central.
draft: false
prerelease: true
## Changelog
${{ env.CHANGELOG }}
- name: Update versions in the project
if: runner.os == 'Linux'
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- Assign different colors to different threads in the Intellij Plugin.
- Rename the thread state to `Runnabled` and `Blocked`.
- Release the Fray Debugger plugin through github actions.
- Append changelog to the release notes in the github action.

### Deprecated

Expand Down
3 changes: 2 additions & 1 deletion plugins/idea/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies {

// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
buildSearchableOptions.set(false)
pluginConfiguration {
version = project.property("version")!! as String

Expand Down Expand Up @@ -74,7 +75,7 @@ intellijPlatform {
}

publishing {
token = providers.environmentVariable("PUBLISH_TOKEN")
token = providers.gradleProperty("intellijPlatformPublishingToken")
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
Expand Down

0 comments on commit 4c3b368

Please sign in to comment.