Update build.yaml

This commit is contained in:
Andrea Cavalli 2020-12-28 00:16:13 +01:00
parent 819db48c9c
commit c66bbb3367

View File

@ -51,13 +51,22 @@ jobs:
key: ${{ runner.os }}-${{ env.CCACHE_SAFE_ARCH }}-ccache-all key: ${{ runner.os }}-${{ env.CCACHE_SAFE_ARCH }}-ccache-all
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.CCACHE_SAFE_ARCH }}-ccache- ${{ runner.os }}-${{ env.CCACHE_SAFE_ARCH }}-ccache-
- name: Setup Java - name: Setup Java (Snapshot)
if: github.ref != 'refs/heads/master'
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 11 java-version: 11
server-id: mchv-snapshot-distribution server-id: mchv-snapshot-distribution
server-username: MAVEN_USERNAME server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD server-password: MAVEN_PASSWORD
- name: Setup Java (Release)
if: github.ref == 'refs/heads/master'
uses: actions/setup-java@v1
with:
java-version: 11
server-id: mchv-release-distribution
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Setup variables - name: Setup variables
shell: bash shell: bash
run: | run: |
@ -117,7 +126,7 @@ jobs:
with: with:
name: ${{ steps.getfilename.outputs.file }} name: ${{ steps.getfilename.outputs.file }}
path: ${{ steps.getfilepath.outputs.file }} path: ${{ steps.getfilepath.outputs.file }}
- name: Deploy snapshot to Maven - name: Deploy to Maven (Snapshot)
if: github.ref != 'refs/heads/master' if: github.ref != 'refs/heads/master'
shell: bash shell: bash
run: | run: |
@ -127,7 +136,7 @@ jobs:
env: env:
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }} MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }} MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
- name: Deploy release to Maven - name: Deploy to Maven (Release)
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
shell: bash shell: bash
run: | run: |