From f251f9fc5561d7b9544bad0befb69f08a4d59ae0 Mon Sep 17 00:00:00 2001 From: aaron-kumar Date: Sun, 19 May 2024 17:40:04 +0530 Subject: [PATCH] Updated github workflows --- .github/workflows/maven.yml | 15 +-------------- .github/workflows/publish.yml | 25 ++----------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e4fb34..2969c4a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,21 +3,8 @@ name: commons-certvalidator Master Build on: [push] jobs: - master-branch-build: + build: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' # run this job only for the master branch - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Build with Maven - run: mvn -B --no-transfer-progress package - - milestone-6-branch-build: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/feature/milestone-6' # run this job only for the feature/milestone-6 branch steps: - uses: actions/checkout@v2 - name: Set up JDK 11 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc7819d..2fa7f0e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,9 +3,8 @@ name: commons-certvalidator Snapshot publish on: [push] jobs: - master-branch-publish: + build: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' # run this job only for the master branch steps: - uses: actions/checkout@v2 - name: Set up Maven Central Repository @@ -19,24 +18,4 @@ jobs: run: mvn --batch-mode deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - - - milestone-6-branch-build: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/feature/milestone-6' # run this job only for the feature/milestone-6 branch - steps: - - uses: actions/checkout@v2 - - name: Set up Maven Central Repository - uses: actions/setup-java@v1 - with: - java-version: 11 - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: Publish package - run: mvn --batch-mode deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file