From bf48b187023d7ef469737cc8b7522d43a16102d0 Mon Sep 17 00:00:00 2001 From: Thom van den Akker Date: Fri, 23 Aug 2024 22:46:09 +0200 Subject: [PATCH] Fix build pipeline [internal] (#10141) Fix build pipeline [internal] --- .github/workflows/build.yaml | 33 ++++++++++++++++++--------------- .github/workflows/release.yml | 17 +++++------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f3218d26cb..48512f6d45d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,31 +1,34 @@ -name: Build and Test PRs or General Branches +name: Build and Pre-release on: pull_request: types: - - synchronize - opened - - ready_for_review - - reopened + - edited + - synchronize + - labeled + - unlabeled push: branches: - - 'feature/**' - - 'bugfix/**' - - 'hotfix/**' - - 'fix/**' - - 'features/**' + - "version/*" + - "release/*" + - "testing/*" workflow_dispatch: permissions: - contents: write + contents: read statuses: write packages: write jobs: - release: - uses: ldtteam/operapublicacreator/.github/workflows/gradle.publish.yaml@main + build: + uses: ldtteam/operapublicacreator/.github/workflows/gradle.build.yaml@main + with: + java: 17 + secrets: inherit + pre-release: + uses: ldtteam/operapublicacreator/.github/workflows/gradle.prerelease.yaml@main + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && contains( github.event.pull_request.labels.*.name, 'Pre-release') with: java: 17 - secrets: - CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} - GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} \ No newline at end of file + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f941b0b462..868c5e4302a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,11 +2,10 @@ name: Release on: push: - branches: [ - "version/*", - "release/*", - "testing/*", - ] + branches: + - "version/*" + - "release/*" + - "testing/*" permissions: contents: write @@ -18,10 +17,4 @@ jobs: with: java: 17 curse_release_type: ${{ contains(github.ref, 'release') && 'release' || 'beta' }} - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - MAVEN_USER: ${{ secrets.MAVEN_USER }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} - CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }} - GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} \ No newline at end of file + secrets: inherit \ No newline at end of file