Split single ci workflow into two

This commit is contained in:
2025-12-09 21:28:42 +03:00
parent c791db409a
commit 99188bea32
2 changed files with 25 additions and 26 deletions

View File

@@ -1,37 +1,13 @@
name: CI
name: release
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run Tests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Test with Gradle
run: ./gradlew check
build-and-publish:
name: Build and Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read

23
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: test
on: [push]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Test with Gradle
run: ./gradlew check