File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 7171 - name : Build Gradle
7272 run : ./gradlew build -x test
7373
74+ - name : Get latest draft release title
75+ run : |
76+ TITLE=$(gh api repos/${{ github.repository }}/releases \
77+ --jq '.[] | select(.draft==true) | .name' | head -n 1)
78+ if [[ -z "$TITLE" ]]; then
79+ echo "No draft release found."
80+ exit 1
81+ fi
82+ VERSION=$(echo "$TITLE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
83+ if [[ -z "$VERSION" ]]; then
84+ echo "No version found in version."
85+ exit 1
86+ fi
87+ echo "Extracted version: $VERSION"
88+ echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
89+ env :
90+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91+
7492 - name : Build plugin
75- run : ./gradlew buildPlugin -PpluginVersion=0.3.2 -${{ github.run_number }}
93+ run : ./gradlew buildPlugin -PpluginVersion=$RELEASE_VERSION -${{ github.run_number }}
7694
7795 - name : Prepare Plugin Artifact
7896 id : artifact
You can’t perform that action at this time.
0 commit comments