diff --git a/.github/workflows/gradle-cd.yml b/.github/workflows/gradle-cd.yml index f1b25ce..0fad2f7 100644 --- a/.github/workflows/gradle-cd.yml +++ b/.github/workflows/gradle-cd.yml @@ -1,4 +1,4 @@ -name: Gradle CD +name: Create plugin zip and release (CD) on: push: @@ -26,40 +26,29 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - name: Fetch all tags - run: git fetch --tags - - - name: Determine next tag version - id: getNextTag + - name: Determine plugin version + id: getPluginVersion run: | # Get version from plugin.xml pluginXmlVersion=$(grep -oP '> $GITHUB_OUTPUT + echo "value=$pluginXmlVersion.$latestShortHash" >> $GITHUB_OUTPUT - name: Grant execute permission for gradlew run: chmod +x ./gradlew - name: Create plugin zip - run: ./gradlew "-PpluginVersion=${{ steps.getNextTag.outputs.value }}" + run: ./gradlew "-PpluginVersion=${{ steps.getPluginVersion.outputs.value }}" - name: Create GitHub release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ steps.getNextTag.outputs.value }} + tag_name: ${{ steps.getPluginVersion.outputs.value }} files: "build/distributions/*.zip" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}