1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- name: Build
- on:
- push:
- pull_request_target:
- types: [labeled]
- env:
- JAVA_VERSION: 19
- defaults:
- run:
- shell: bash
- jobs:
- test:
- name: Compile and Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-java@v3
- with:
- distribution: 'zulu'
- java-version: ${{ env.JAVA_VERSION }}
- cache: 'maven'
- - name: Cache SonarCloud packages
- uses: actions/cache@v3
- with:
- path: ~/.sonar/cache
- key: ${{ runner.os }}-sonar
- restore-keys: ${{ runner.os }}-sonar
- - name: Build and Test
- run: >
- xvfb-run
- mvn -B verify
- jacoco:report
- org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- -Pcoverage,dependency-check
- -Dsonar.projectKey=cryptomator_cryptomator
- -Dsonar.organization=cryptomator
- -Dsonar.host.url=https://sonarcloud.io
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- - name: Draft a release
- if: startsWith(github.ref, 'refs/tags/')
- uses: softprops/action-gh-release@v1
- with:
- draft: true
- discussion_category_name: releases
- token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
- generate_release_notes: true
- body: |-
- :construction: Work in Progress
-
- ---
|