Migrate to Bzlmod #35
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
env: | |
USE_BAZEL_VERSION: ${{ matrix.bazel_version }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
bazel_version: [bazelbuild/7.3.1] | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
- uses: bazel-contrib/[email protected] | |
with: | |
bazelisk-version: 1.20.0 | |
- run: cat .bazelrc.ci >> .bazelrc | |
- run: ./scripts/format.sh check | |
- run: ./test/run_all_tests.sh ci | |
- run: ./scripts/gen-docs.sh && git diff --exit-code docs/ | |
- run: bazel shutdown | |
publish: | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
needs: build-and-test | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
- uses: bazel-contrib/[email protected] | |
with: | |
bazelisk-version: 1.20.0 | |
- run: cat .bazelrc.ci >> .bazelrc | |
- name: Import gpg keys | |
run: echo "$PGP_SECRET" | base64 --decode | gpg --import | |
env: | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
- name: Publish to Maven | |
run: ./scripts/publish.sh | |
env: | |
MAVEN_USER: ${{ secrets.SONATYPE_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |