-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (46 loc) · 1.35 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 }}