Skip to content

Commit e34eb1f

Browse files
authored
Merge branch 'bufbuild:main' into main
2 parents bfb9348 + 0ea3708 commit e34eb1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1455
-311
lines changed

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,42 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7+
groups:
8+
github-actions:
9+
patterns: ["*"]
710
- package-ecosystem: gomod
811
directory: /
912
schedule:
1013
interval: weekly
14+
groups:
15+
go:
16+
patterns: ["*"]
1117
- package-ecosystem: gomod
1218
directory: /tests
1319
schedule:
1420
interval: weekly
21+
groups:
22+
go-tests:
23+
patterns: ["*"]
1524
- package-ecosystem: maven
1625
directory: /java
1726
schedule:
1827
interval: weekly
1928
open-pull-requests-limit: 40
29+
groups:
30+
java:
31+
patterns: ["*"]
2032
- package-ecosystem: pip
2133
directory: /
2234
schedule:
2335
interval: weekly
36+
groups:
37+
python-root:
38+
patterns: ["*"]
2439
- package-ecosystem: pip
2540
directory: /python
2641
schedule:
2742
interval: weekly
43+
groups:
44+
python:
45+
patterns: ["*"]

.github/workflows/add-to-project.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Add issues and PRs to project
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- reopened
8+
- transferred
9+
pull_request_target:
10+
types:
11+
- opened
12+
- reopened
13+
issue_comment:
14+
types:
15+
- created
16+
17+
jobs:
18+
call-workflow-add-to-project:
19+
name: Call workflow to add issue to project
20+
uses: bufbuild/base-workflows/.github/workflows/add-to-project.yaml@main
21+
secrets: inherit

.github/workflows/ci.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
env:
1111
# Keep these versions in sync with the Dockerfile
1212
BDR_VER: '6.0.1'
13-
GO_VER: '1.19.x'
14-
PGG_VER: 'v1.30.0'
15-
PROTOC_VER: '22.2'
13+
GO_VER: '1.21.x'
14+
PGG_VER: 'v1.31.0'
15+
PROTOC_VER: '24.3'
1616
PYTHON_VER: '3.8'
1717
TEST_TAG: protoc-gen-validate:${{ github.sha }}
1818

@@ -21,20 +21,20 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Cache
24-
uses: actions/cache@v3
24+
uses: actions/cache@v4
2525
with:
2626
path: |
2727
~/.cache/bazelisk
2828
~/.cache/bazel
2929
~/.cache/protoc
3030
key: ${{ runner.os }}-build-cache
3131
- name: Checkout
32-
uses: actions/checkout@v3
33-
- uses: actions/setup-go@v4
32+
uses: actions/checkout@v4
33+
- uses: actions/setup-go@v5
3434
with:
3535
go-version: ${{ env.GO_VER }}
3636
cache: true
37-
- uses: actions/setup-python@v4
37+
- uses: actions/setup-python@v5
3838
with:
3939
python-version: ${{ env.PYTHON_VER }}
4040
cache: 'pip'

.github/workflows/goreleaser.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ jobs:
1313
goreleaser:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919
- run: git fetch --force --tags
20-
- uses: actions/setup-go@v4
20+
- uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.19.x
22+
go-version: 1.21.x
2323
use-latest: true
2424
cache: true
25-
- uses: goreleaser/goreleaser-action@v4
25+
- uses: goreleaser/goreleaser-action@v6
2626
with:
2727
distribution: goreleaser
2828
version: latest
29-
args: release --rm-dist
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
- name: Upload assets
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: protoc-gen-validate
3636
path: dist/*

.github/workflows/maven-deploy.yaml

+12-10
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
env:
15-
SONATYPE_USER: ${{secrets.BUF_SONATYPE_USER}}
16-
SONATYPE_PASSWORD: ${{secrets.BUF_SONATYPE_PASSWORD}}
15+
SONATYPE_USER: ${{secrets.SONATYPE_USER}}
16+
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}
1717
GPG_KEY_NAME: ${{secrets.GPG_KEY_NAME}}
1818
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}}
1919
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
2020
REF_NAME: ${{ github.ref_name }}
2121

2222
steps:
23-
- uses: actions/checkout@v3
24-
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-go@v5
25+
with:
26+
go-version: 'stable'
2527
- name: Set VERSION variable from tag
2628
run: |
2729
VERSION=${{ env.REF_NAME }}
@@ -41,32 +43,32 @@ jobs:
4143
echo $GPG_KEY | base64 --decode > signing-key
4244
gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key
4345
shred signing-key
44-
46+
4547
- name: Configure GIT
4648
run: |
47-
git config --global user.email "[email protected]"
49+
git config --global user.email "[email protected]"
4850
git config --global user.name "envoy-bot"
4951
5052
- name: Set up JDK
51-
uses: actions/setup-java@v3
53+
uses: actions/setup-java@v4
5254
with:
5355
distribution: 'temurin'
5456
java-version: '17'
5557
cache: 'maven'
56-
server-id: sonatype-nexus-snapshots
58+
server-id: ossrh
5759
server-username: ${ env.SONATYPE_USER }
5860
server-password: ${ env.SONATYPE_PASSWORD }
5961
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
6062
gpg-passphrase: ${ env.GPG_PASSPHRASE }
6163

6264
- name: Update version in pom
6365
working-directory: ${{ github.workspace }}/java
64-
run: mvn -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false
66+
run: ./mvnw -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false
6567

6668
- name: Publish to Maven Packages Apache Maven
6769
working-directory: ${{ github.workspace }}/java
6870
run: |
69-
mvn -B -s settings.xml clean deploy \
71+
./mvnw -B -s settings.xml clean deploy \
7072
-Darguments="-s settings.xml" \
7173
-DreleaseVersion=${{ env.VERSION }} \
7274
-DdevelopmentVersion=${{ env.VERSION }}-SNAPSHOT \

.github/workflows/maven-release.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
## For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+
name: Maven Manual Deploy
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
description: "Git ref to release"
11+
required: true
12+
version:
13+
description: "Maven version to release (without 'v' prefix)"
14+
required: true
15+
deployArgs:
16+
description: "Additional Maven deploy arguments (e.g. '--debug -DautoReleaseAfterClose=false')"
17+
required: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
env:
23+
SONATYPE_USER: ${{secrets.SONATYPE_USER}}
24+
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}
25+
GPG_KEY_NAME: ${{secrets.GPG_KEY_NAME}}
26+
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}}
27+
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
28+
REF_NAME: ${{ inputs.ref }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ inputs.ref }}
34+
- uses: actions/setup-go@v5
35+
with:
36+
go-version: 'stable'
37+
- name: Set VERSION variable from tag
38+
run: |
39+
echo "VERSION=${{ inputs.VERSION }}" >> $GITHUB_ENV
40+
41+
- name: 'Configure GPG signing'
42+
env:
43+
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
44+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
45+
run: |
46+
# https://github.com/keybase/keybase-issues/issues/2798
47+
export GPG_TTY=$(tty)
48+
# Import gpg keys and warm the passphrase to avoid the gpg
49+
# passphrase prompt when initating a deploy
50+
# `--pinentry-mode=loopback` could be needed to ensure we
51+
# suppress the gpg prompt
52+
echo $GPG_KEY | base64 --decode > signing-key
53+
gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key
54+
shred signing-key
55+
56+
- name: Configure GIT
57+
run: |
58+
git config --global user.email "[email protected]"
59+
git config --global user.name "envoy-bot"
60+
61+
- name: Set up JDK
62+
uses: actions/setup-java@v4
63+
with:
64+
distribution: 'temurin'
65+
java-version: '17'
66+
cache: 'maven'
67+
server-id: ossrh
68+
server-username: ${ env.SONATYPE_USER }
69+
server-password: ${ env.SONATYPE_PASSWORD }
70+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
71+
gpg-passphrase: ${ env.GPG_PASSPHRASE }
72+
73+
- name: Update version in pom
74+
working-directory: ${{ github.workspace }}/java
75+
run: ./mvnw -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false
76+
77+
- name: Publish to Maven Packages Apache Maven
78+
working-directory: ${{ github.workspace }}/java
79+
run: |
80+
./mvnw -B -s settings.xml ${{ inputs.deployArgs }} clean deploy \
81+
-Darguments="-s settings.xml" \
82+
-DreleaseVersion=${{ env.VERSION }} \
83+
-DdevelopmentVersion=${{ env.VERSION }}-SNAPSHOT \
84+
-DscmCommentPrefix="java release: "
85+
env:
86+
MAVEN_USERNAME: ${{ env.SONATYPE_USER }}
87+
MAVEN_CENTRAL_TOKEN: ${{ env.SONATYPE_PASSWORD }}
88+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2-
## For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3-
41
name: Maven Verify
52

63
on:
@@ -13,13 +10,16 @@ jobs:
1310
contents: read
1411

1512
steps:
16-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: 'stable'
1717
- name: Set up JDK 17
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: "17"
2121
distribution: "temurin"
2222
cache: "maven"
2323
- name: Verify with Maven
2424
working-directory: ${{ github.workspace }}/java
25-
run: mvn -B verify
25+
run: ./mvnw -B verify

.github/workflows/python-package.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
- name: Set up QEMU
19-
uses: docker/setup-qemu-action@v2
19+
uses: docker/setup-qemu-action@v3
2020
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v2
21+
uses: docker/setup-buildx-action@v3
2222
- name: Build and export to Docker
23-
uses: docker/build-push-action@v4
23+
uses: docker/build-push-action@v6
2424
with:
2525
context: .
2626
load: true

.github/workflows/version-bump.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@ jobs:
2828
steps:
2929
- name: Generate token
3030
id: generate_token
31-
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
31+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
3232
with:
3333
app_id: ${{ env.APP_ID }}
3434
private_key: ${{ secrets.TOKEN_EXCHANGE_GH_APP_PRIVATE_KEY }}
35-
repository: ${{ github.repository }}
3635
permissions: >-
3736
{"contents": "write"}
38-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3938
with:
4039
fetch-depth: "0"
41-
- uses: actions/setup-node@v3
40+
- uses: actions/setup-node@v4
4241
with:
4342
node-version: 16
4443
- run: npm install -g semver

.golangci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
linters:
2+
enable:
3+
- gci
4+
- gocritic
5+
- gofumpt
6+
- govet
7+
- misspell
8+
- unused
9+
10+
linters-settings:
11+
gci:
12+
sections:
13+
- standard
14+
- default
15+
- prefix(github.com/envoyproxy)
16+
govet:
17+
check-shadowing: true
18+
# Settings per analyzer.
19+
settings:
20+
shadow:
21+
# Whether to be strict about shadowing; can be noisy.
22+
strict: true
23+
enable:
24+
- shadow
25+
26+
run:
27+
timeout: 5m

0 commit comments

Comments
 (0)