Skip to content

chore: fix pipeline syntax #2

chore: fix pipeline syntax

chore: fix pipeline syntax #2

Workflow file for this run

name: Draft release
on:
workflow_dispatch:
inputs:
versionBump:
description: 'Version bump'
type: choice
required: true
default: 'patch'
options:
- patch
- minor
- major
- exact-version
exactVersion:
description: 'Exact version: (Only effective selecting "exact-version" as version bump)'
required: false
jobs:
prepare-release:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4

Check failure on line 29 in .github/workflows/draft-release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/draft-release.yaml

Invalid workflow file

You have an error in your yaml syntax on line 29
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- name: Determine Next Version
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
VERSION_BUMP=${{ github.event.inputs.versionBump }}
if [[ "$VERSION_BUMP" == "major" || "$VERSION_BUMP" == "minor" || "$VERSION_BUMP" == "patch" ]]; then
./gradlew versionBump -Pmode="$VERSION_BUMP"
else
./gradlew versionBump -PexactVersion="${{ github.event.inputs.exactVersion }}"
fi
NEXT_VERSION=$(./gradlew --console=plain --quiet getVersion)
echo "RELEASE_TAG=v${NEXT_VERSION}" >> "$GITHUB_ENV"
- name: Validate release tag
shell: bash
run: |
if [ -z "${RELEASE_TAG}" ]; then
echo "RELEASE_TAG is not set or is empty"
exit 1
fi
if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1; then
echo "Error: Tag $RELEASE_TAG already existing"
echo "If you are trying to re-create a draft release with this version, please delete the release and the tag first."
echo "If this version has already been release consider using a different one."
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- name: Run All Tests
run: |
./gradlew test functionalTests
- name: Verify Plugin
run: |
./gradlew ":packages:jetbrains-plugin:runPluginVerifier"
- name: Generate SBOM
run: |
./gradlew cyclonedxBom
- name: Create Draft Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
echo Creating draft release for: "${RELEASE_TAG}"
echo We will do something here at some point