Skip to content

Commit 6a6691e

Browse files
committed
fix: token usage
Signed-off-by: Ruben Romero Montes <[email protected]>
1 parent 688b546 commit 6a6691e

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.github/workflows/publish-marketplace.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
if: (github.event_name == 'schedule' && steps.changes_check.outputs.has_changes == 'true') || github.event_name == 'workflow_dispatch'
9999
run: |
100100
echo "Building nightly version from source..."
101-
./gradlew buildPlugin -Pgpr.username=${{ github.actor }} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
101+
./gradlew buildPlugin -Pgpr.username=rhdevelopers-ci -Pgpr.token=${{ secrets.GITHUB_TOKEN }} -PprojectVersion=${{ steps.version_info.outputs.VERSION }}
102102
103103
- name: Skip nightly build
104104
if: github.event_name == 'schedule' && steps.changes_check.outputs.has_changes == 'false'
@@ -119,33 +119,21 @@ jobs:
119119
- name: Verify ZIP file exists
120120
run: |
121121
ls -la build/distributions/
122-
# For nightly builds, the filename might be different, so find any ZIP file
123-
if [ "${{ steps.version_info.outputs.CHANNEL }}" == "nightly" ]; then
124-
ZIP_COUNT=$(find build/distributions -name "*.zip" | wc -l)
125-
if [ "$ZIP_COUNT" -eq 0 ]; then
126-
echo "Error: No ZIP files found for nightly build!"
127-
exit 1
128-
fi
129-
# Rename the first ZIP file to match our expected naming convention
130-
FIRST_ZIP=$(find build/distributions -name "*.zip" | head -1)
131-
mv "$FIRST_ZIP" "build/distributions/intellij-dependency-analytics-${{ steps.version_info.outputs.VERSION }}.zip"
132-
else
133122
# For stable releases, expect the exact filename
134-
if [ ! -f "build/distributions/intellij-dependency-analytics-${{ steps.version_info.outputs.VERSION }}.zip" ]; then
135-
echo "Error: ZIP file not found!"
136-
exit 1
137-
fi
123+
if [ ! -f "build/distributions/intellij-dependency-analytics-${{ steps.version_info.outputs.VERSION }}.zip" ]; then
124+
echo "Error: ZIP file not found!"
125+
exit 1
138126
fi
139127
echo "✅ ZIP file verified: build/distributions/intellij-dependency-analytics-${{ steps.version_info.outputs.VERSION }}.zip"
140128
141129
- name: Publish to JetBrains Marketplace
142130
if: steps.version_info.outputs.CHANNEL != 'none'
143131
run: >
144132
./gradlew publishPlugin
145-
-Ptoken=${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
133+
-PjetBrainsToken=${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
146134
-PprojectVersion=${{ steps.version_info.outputs.VERSION }}
147135
-PjetBrainsChannel=${{ steps.version_info.outputs.CHANNEL }}
148-
-Pgpr.username=${{ github.actor }}
136+
-Pgpr.username=rhdevelopers-ci
149137
-Pgpr.token=${{ secrets.GITHUB_TOKEN }}
150138
151139
- name: Publish success notification

build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ dependencies {
7575

7676
pluginVerifier()
7777
testFramework(TestFrameworkType.Platform)
78+
7879
}
7980

8081
implementation(libs.github.api)
@@ -97,6 +98,11 @@ tasks {
9798
runIde {
9899
systemProperties["com.redhat.devtools.intellij.telemetry.mode"] = "debug"
99100
}
101+
102+
publishPlugin {
103+
token = providers.gradleProperty("jetBrainsToken")
104+
channels = listOf(providers.gradleProperty("jetBrainsChannel").get())
105+
}
100106
}
101107

102108
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#runIdeForUiTests
@@ -119,4 +125,9 @@ intellijPlatform {
119125
"TemplateWordInPluginId"
120126
)
121127
}
128+
129+
publishing {
130+
token = providers.gradleProperty("jetBrainsToken")
131+
channels = listOf(providers.gradleProperty("jetBrainsChannel").get())
132+
}
122133
}

0 commit comments

Comments
 (0)