Skip to content

.

. #6

Workflow file for this run

name: Build, Test and Release
on:
push:
branches: [cicd]
pull_request:
branches: [cicd]
jobs:
create-release:

Check failure on line 10 in .github/workflows/cicd.yaml

View workflow run for this annotation

GitHub Actions / Build, Test and Release

Invalid workflow file

The workflow is not valid. .github/workflows/cicd.yaml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.
name: Create Release
needs: build-and-test
if: github.ref == 'refs/heads/cicd'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Format Kotlin code with ktfmt
run: ./gradlew ktfmtFormat
- name: Build with Gradle
run: ./gradlew build
- name: Get version from build
id: version
run: |
VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
body: |
Automatic release created by GitHub Actions
Version: ${{ steps.version.outputs.version }}
draft: false
prerelease: false
files: |
build/libs/*.jar