diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5bf806f..3517e35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,9 +2,56 @@ name: Publish on: push: - branches: - - develop + branches: [ develop ] + +permissions: + contents: read jobs: + build: + name: Compile and Test code + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee + with: + arguments: build + env: + GITHUB_USER: ${{secrets.ARTIFACT_REPO_USER}} + GITHUB_TOKEN: ${{secrets.ARTIFACT_REPO_TOKEN}} + PRISM_NODE_HOST: ${{secrets.PRISM_NODE_HOST}} + PRISM_SDK_PASSWORD: ${{secrets.PRISM_SDK_PASSWORD}} + PRISM_SDK_USER: ${{secrets.PRISM_SDK_USER}} + publish: + name: Publish Artifacts + runs-on: ubuntu-latest + + needs: [build] if: "contains(github.event.head_commit.message, '[publish]')" + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Publish with Gradle + uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee + with: + arguments: publish + env: + GITHUB_USER: ${{secrets.ARTIFACT_REPO_USER}} + GITHUB_TOKEN: ${{secrets.ARTIFACT_REPO_TOKEN}} + PRISM_NODE_HOST: ${{secrets.PRISM_NODE_HOST}} + PRISM_SDK_PASSWORD: ${{secrets.PRISM_SDK_PASSWORD}} + PRISM_SDK_USER: ${{secrets.PRISM_SDK_USER}} + +