Fix warning on unnecessary double load of openpnp-capture library #70
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # TODO Add publishing to github Packages to speed up the distribution. | |
| # https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-maven#publishing-packages-to-the-maven-central-repository-and-github-packages | |
| name: Build OpenPnP Capture Java Distribution | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| java: [8] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Setup JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| server-id: ossrh | |
| server-username: OSSRH_USERNAME | |
| server-password: OSSRH_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| - name: Cache maven packages | |
| uses: actions/cache@v2 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-maven- | |
| - name: Build | |
| run: | | |
| ./scripts/download-openpnp-capture.sh v0.0.28 | |
| mvn -B clean package | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| path: | | |
| target/openpnp-capture-java-*.jar | |
| - name: Create Release | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "target/openpnp-capture-java*.jar" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| allowUpdates: true | |
| - name: Publish to Apache Maven Central | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| run: mvn -B deploy | |
| env: | |
| OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |