From 442f5261b0f3e98889d7d25f52b7be3645ee009f Mon Sep 17 00:00:00 2001 From: Raphael Schweikert Date: Wed, 16 Oct 2024 17:41:04 +0200 Subject: [PATCH] ci: do not run check on main branch, make publish call it --- .github/workflows/check.yml | 7 +++++-- .github/workflows/release.yml | 15 +++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 018b750..4786c4e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,8 +1,11 @@ name: Code Check with Gradle on: - - push - - pull_request + push: + branches-ignore: + - main + pull_request: + workflow_call: jobs: check: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee6b1c2..ecfeb91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,22 +8,25 @@ on: - v[0-9]+.[0-9]+.[0-9]+ jobs: - publish: + check: + uses: ./.github/workflows/check.yml + + release: + needs: + - check runs-on: ubuntu-latest permissions: - contents: read - packages: write + contents: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: '11' distribution: 'zulu' - - uses: gradle/actions/setup-gradle@v4 # v4.0.0 - - - run: ./gradlew check + - uses: gradle/actions/setup-gradle@v4 - name: Create Changelog and Tag uses: TriPSs/conventional-changelog-action@v5