build: deploy to maven central #38
This file contains 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
name: Deploy device-api lib | |
on: | |
push: | |
jobs: | |
publish-maven: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- name: Run tests | |
run: ./gradlew test | |
- name: Build and publish package to github | |
run: ./gradlew publishGprPublicationToGitHubPackagesRepository | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and publish package to nexus | |
run: ./gradlew publishGprPublicationToCentralRepository | |
env: | |
CI_USERNAME: ${{ secrets.CI_USERNAME }} | |
CI_PASSWORD: ${{ secrets.CI_PASSWORD }} |