Skip to content

Update pluginVerifier version in dependencies and build configuration #343

Update pluginVerifier version in dependencies and build configuration

Update pluginVerifier version in dependencies and build configuration #343

Workflow file for this run

name: Release Drafter
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: main
update_version:
needs: update_release_draft
if: ${{ !contains(github.head_ref, 'doc/changelog-update-') && startsWith(github.event.head_commit.message, 'Merge pull request') }}
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
steps:
- name: Get latest draft release title
run: |
TITLE=$(gh api repos/${{ github.repository }}/releases \
--jq '.[] | select(.draft==true) | .name' | head -n 1)
if [[ -z "$TITLE" ]]; then
echo "No draft release found."
exit 1
fi
VERSION=$(echo "$TITLE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
if [[ -z "$VERSION" ]]; then
echo "No version found in version."
exit 1
fi
echo "Extracted version: $VERSION"
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
- name: Update Version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew replaceDraftVersion -PdraftVersion=$RELEASE_VERSION --no-configuration-cache
- name: Commit New Version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action"
git pull
git add src/main/kotlin/org/domaframework/doma/intellij/common/util/PluginUtil.kt
git add src/main/resources/logback.xml
git add src/main/resources/logback-test.xml
git add gradle.properties
if [[ -z "$(git status --porcelain)" ]]; then
echo "No changes to commit."
exit 0
fi
git commit -am "Update Version With Release Draft - $RELEASE_VERSION"
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
git push origin $BRANCH_NAME