Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWC-6663-test #5285

Closed
wants to merge 15 commits into from
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: build
on:
workflow_call:
inputs:
mvn_goal:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: corretto
cache: 'maven'
server-id: sagebionetworks
server-username: MAVEN_USERNAME
server-password: MAVEN_USERPWD
- name: Version artifacts
if: ${{ inputs.mvn_goal == 'deploy' }}
run: chmod 777 pomSnapshotToLastGitTag.sh && ./pomSnapshotToLastGitTag.sh
- name: Build with Maven
run: echo mvn -B ${{ inputs.mvn_goal }} --file pom.xml
env:
MAVEN_USERNAME: ${{ secrets.PLATFORM_ARTIFACTORY_USER }}
MAVEN_USERPWD: ${{ secrets.PLATFORM_ARTIFACTORY_PWD }}
21 changes: 21 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build-main

on:
push:
branches: [develop, release-**]
pull_request:
branches: [develop, release-**]

jobs:
call-build:
if: github.event_name == 'push' && github.ref != 'refs/heads/develop' && github.repository_owner == 'Sage-Bionetworks'
uses: ./.github/workflows/build.yaml
with:
mvn_goal: deploy
secrets: inherit
call-test:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build.yaml
with:
mvn_goal: package
secrets: inherit
19 changes: 0 additions & 19 deletions .github/workflows/maven.yml

This file was deleted.

Loading