diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f510454..4d81237 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,14 +10,14 @@ on: - "*" jobs: lint: - name: "Lint" + name: "Lint & Publish Draft/Branch" runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v3" - uses: "authzed/actions/yaml-lint@main" - - uses: "bufbuild/buf-setup-action@v1" + - uses: "bufbuild/buf-setup-action@v1.30.0" with: - version: "1.22.0" + version: "1.30.0" - uses: "bufbuild/buf-lint-action@v1" - uses: "bufbuild/buf-breaking-action@v1" if: "github.event_name == 'pull_request'" @@ -33,3 +33,15 @@ jobs: env: BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" run: "buf push --draft ${{ github.sha }}" + - name: "Push to BSR a Draft" + if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" + shell: "bash" + env: + BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" + run: "buf push --draft ${{ github.sha }}" + - name: "Push to BSR a Branch" + if: "github.event_name == 'push' && github.ref != 'refs/heads/main'" + shell: "bash" + env: + BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" + run: "buf push --branch ${{ github.sha }}" diff --git a/authzed/api/v1/core.proto b/authzed/api/v1/core.proto index 72d98d2..1e67cab 100644 --- a/authzed/api/v1/core.proto +++ b/authzed/api/v1/core.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "google/protobuf/struct.proto"; import "validate/validate.proto"; diff --git a/authzed/api/v1/debug.proto b/authzed/api/v1/debug.proto index f17cbcf..3f72f0a 100644 --- a/authzed/api/v1/debug.proto +++ b/authzed/api/v1/debug.proto @@ -8,6 +8,7 @@ import "google/protobuf/duration.proto"; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; // DebugInformation defines debug information returned by an API call in a footer when // requested with a specific debugging header. diff --git a/authzed/api/v1/error_reason.proto b/authzed/api/v1/error_reason.proto index 1526852..b6cb014 100644 --- a/authzed/api/v1/error_reason.proto +++ b/authzed/api/v1/error_reason.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; // Defines the supported values for `google.rpc.ErrorInfo.reason` for the // `authzed.com` error domain. diff --git a/authzed/api/v1/experimental_service.proto b/authzed/api/v1/experimental_service.proto index 4d8434c..b380b9a 100644 --- a/authzed/api/v1/experimental_service.proto +++ b/authzed/api/v1/experimental_service.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "google/api/annotations.proto"; import "validate/validate.proto"; diff --git a/authzed/api/v1/openapi.proto b/authzed/api/v1/openapi.proto index 693f52a..d6bcbff 100644 --- a/authzed/api/v1/openapi.proto +++ b/authzed/api/v1/openapi.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "protoc-gen-openapiv2/options/annotations.proto"; diff --git a/authzed/api/v1/permission_service.proto b/authzed/api/v1/permission_service.proto index ad26df7..63f9436 100644 --- a/authzed/api/v1/permission_service.proto +++ b/authzed/api/v1/permission_service.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "google/protobuf/struct.proto"; import "google/api/annotations.proto"; diff --git a/authzed/api/v1/schema_service.proto b/authzed/api/v1/schema_service.proto index e13f554..08c3a66 100644 --- a/authzed/api/v1/schema_service.proto +++ b/authzed/api/v1/schema_service.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "google/api/annotations.proto"; import "validate/validate.proto"; diff --git a/authzed/api/v1/watch_service.proto b/authzed/api/v1/watch_service.proto index f8f49df..263985e 100644 --- a/authzed/api/v1/watch_service.proto +++ b/authzed/api/v1/watch_service.proto @@ -3,6 +3,7 @@ package authzed.api.v1; option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; option java_package = "com.authzed.api.v1"; +option java_multiple_files = true; import "google/api/annotations.proto"; import "validate/validate.proto"; diff --git a/buf.yaml b/buf.yaml index ba500ff..b50e11a 100644 --- a/buf.yaml +++ b/buf.yaml @@ -8,3 +8,6 @@ deps: lint: ignore: - "authzed/api/v0" # legacy from before we used buf +breaking: + use: + - "WIRE_JSON"