Use Nexus Plugin to publish okbuck artifacts to Maven Central #201
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
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| name: Okbuck CI Checks | |
| env: | |
| SKIP_OKBUCK: true | |
| EXTRA_OKBUCK_ARGS: "--quiet --stacktrace" | |
| EXTRA_BUCK_ARGS: "-v 0" | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| build_cmd: [build, lint, test] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 11 | |
| distribution: temurin | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.8' | |
| - name: Run ${{ matrix.build_cmd }} | |
| run: ./tooling/ci/build_cmd.sh ${{ matrix.build_cmd }} | |
| - name: Upload snapshot | |
| run: ./gradlew publish -PmavenCentralUsername="${{ secrets.SonatypeUsername }}" -PmavenCentralPassword="${{ secrets.SonatypePassword }}" | |
| if: success() && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' |