From 7bbe0fbe9b80f823695d8b62efd5d6cfa52b22fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Mendes?= Date: Mon, 15 Jul 2024 21:16:11 -0300 Subject: [PATCH] Merge build workflow into deploy --- .github/workflows/maven.yml | 17 ++++++++++++----- .../{maven-publish.yml => pr_maven.yml} | 17 ++++------------- 2 files changed, 16 insertions(+), 18 deletions(-) rename .github/workflows/{maven-publish.yml => pr_maven.yml} (58%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8276cb4..2618045 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,10 +1,8 @@ -name: Java CI with Maven +name: Java CI with Maven and Deploy to Repository on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] jobs: build: @@ -25,8 +23,17 @@ jobs: distribution: 'temurin' architecture: x64 - - name: Build + - uses: s4u/maven-settings-action@v3.0.0 + with: + servers: | + [{ + "id": "vouncherstudios-repository-snapshots", + "username": "${{ secrets.REPOSITORY_USERNAME }}", + "password": "${{ secrets.REPOSITORY_PASSWORD }}" + }] + + - name: Build and Deploy run: | git config --global user.email "you@example.com" git config --global user.name "Your Name" - ./acf build \ No newline at end of file + ./acf deploy \ No newline at end of file diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/pr_maven.yml similarity index 58% rename from .github/workflows/maven-publish.yml rename to .github/workflows/pr_maven.yml index d098e05..4e8cadd 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/pr_maven.yml @@ -1,7 +1,7 @@ -name: Maven Package +name: Java CI with Maven on: - push: + pull_request: branches: [ "master" ] jobs: @@ -23,17 +23,8 @@ jobs: distribution: 'temurin' architecture: x64 - - uses: s4u/maven-settings-action@v3.0.0 - with: - servers: | - [{ - "id": "vouncherstudios-repository-snapshots", - "username": "${{ secrets.REPOSITORY_USERNAME }}", - "password": "${{ secrets.REPOSITORY_PASSWORD }}" - }] - - - name: Deploy + - name: Build run: | git config --global user.email "you@example.com" git config --global user.name "Your Name" - ./acf deploy \ No newline at end of file + ./acf build \ No newline at end of file