From 0ea330d48b33e72f2df928f6de685d1559a56642 Mon Sep 17 00:00:00 2001 From: tueem Date: Wed, 20 Nov 2024 12:01:47 +0100 Subject: [PATCH] move to seperate files because gitea does not have expressions yet --- .gitea/workflows/gradle-publish-dev.yaml | 40 ++++++++++++++++++++++++ .gitea/workflows/gradle-publish.yaml | 11 ++----- 2 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 .gitea/workflows/gradle-publish-dev.yaml diff --git a/.gitea/workflows/gradle-publish-dev.yaml b/.gitea/workflows/gradle-publish-dev.yaml new file mode 100644 index 0000000..29509f2 --- /dev/null +++ b/.gitea/workflows/gradle-publish-dev.yaml @@ -0,0 +1,40 @@ +name: Publish + +on: + push: + branches: [dev] + +jobs: + Gradle-Publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '23' + check-latest: true + distribution: 'zulu' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + add-job-summary: always + cache-cleanup: on-success + + - name: Cache Gradle dependencies + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Publish Dev + env: + GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }} + run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository \ No newline at end of file diff --git a/.gitea/workflows/gradle-publish.yaml b/.gitea/workflows/gradle-publish.yaml index e0ec879..7f83868 100644 --- a/.gitea/workflows/gradle-publish.yaml +++ b/.gitea/workflows/gradle-publish.yaml @@ -2,7 +2,7 @@ name: Publish on: push: - branches: [master, dev] + branches: [master] jobs: Gradle-Publish: @@ -35,13 +35,6 @@ jobs: ${{ runner.os }}-gradle- - name: Publish Release - if: ${{ github.ref == '/refs/heads/master' }} env: GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }} - run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository -Prelease - - - name: Publish Dev - if: ${{ github.ref == '/refs/heads/dev' }} - env: - GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }} - run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository \ No newline at end of file + run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository -Prelease \ No newline at end of file