Skip to content

Commit bf9d4a0

Browse files
authored
Merge pull request #136 from authzed/fix-release-process
Bump API version and fix automatic bumping
2 parents 3fba5b2 + 16bebe8 commit bf9d4a0

9 files changed

+21
-70
lines changed

Diff for: .github/dependabot.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 2
23
updates:
34
- package-ecosystem: 'bundler'

Diff for: .github/workflows/automatic-api-update.yaml

+3-30
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,26 @@ jobs:
1616
with:
1717
api-commit: "${{ github.event.client_payload.BUFTAG }}"
1818
spec-path: buf.gen.yaml
19-
file-format: generate-shell-script
19+
file-format: "buf-gen-yaml"
2020
- name: "Output update status"
2121
env:
2222
UPDATED_STATUS: ${{ steps.buf-update.outputs.updated }}
2323
run: |
2424
echo "Update status: $UPDATED_STATUS"
25-
- name: "Install ruby and dependencies"
26-
uses: "ruby/setup-ruby@v1"
27-
with:
28-
bundler-cache: true
29-
- name: "Update package version"
30-
uses: authzed/actions/semver-update@main
31-
if: steps.buf-update.outputs.updated == 'true'
32-
with:
33-
sourcefile-path: authzed.gemspec
34-
version-regex: 's.version = "(.+)"'
35-
version-change: minor
36-
- name: "Update Gemfile"
37-
run: |
38-
bundle config unset deployment
39-
bundle install
40-
- name: "Install protoc"
41-
uses: "arduino/setup-protoc@v3"
42-
with:
43-
version: "24.4"
44-
- name: "Install Homebrew & gRPC"
45-
run: |
46-
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
47-
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bash_profile
48-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
49-
brew install grpc
50-
which grpc_ruby_plugin
51-
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
5225
- name: "Install buf"
5326
uses: "bufbuild/[email protected]"
5427
with:
5528
github_token: ${{ secrets.GITHUB_TOKEN }}
5629
if: steps.buf-update.outputs.updated == 'true'
5730
- name: "Run buf generate"
5831
if: steps.buf-update.outputs.updated == 'true'
59-
run: |
60-
./buf.gen.yaml
32+
run: "buf generate"
6133
- name: Create Pull Request
6234
uses: peter-evans/[email protected]
6335
if: steps.buf-update.outputs.updated == 'true'
6436
with:
6537
delete-branch: "true"
6638
title: "Update API to ${{ github.event.client_payload.BUFTAG }}"
6739
branch: "api-change/${{ github.event.client_payload.BUFTAG }}"
40+
base: "main"
6841
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/manual-api-update.yaml

+4-30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Update for API change
23
on:
34
workflow_dispatch:
@@ -20,53 +21,26 @@ jobs:
2021
with:
2122
api-commit: ${{ inputs.buftag }}
2223
spec-path: buf.gen.yaml
23-
file-format: generate-shell-script
24+
file-format: "buf-gen-yaml"
2425
- name: "Output update status"
2526
env:
2627
UPDATED_STATUS: ${{ steps.buf-update.outputs.updated }}
2728
run: |
2829
echo "Update status: $UPDATED_STATUS"
29-
- name: "Install ruby and dependencies"
30-
uses: "ruby/setup-ruby@v1"
31-
with:
32-
bundler-cache: true
33-
- name: "Update package version"
34-
uses: authzed/actions/semver-update@main
35-
if: steps.buf-update.outputs.updated == 'true'
36-
with:
37-
sourcefile-path: authzed.gemspec
38-
version-regex: 's.version = "(.+)"'
39-
version-change: minor
40-
- name: "Update Gemfile"
41-
run: |
42-
bundle config unset deployment
43-
bundle install
44-
- name: "Install protoc"
45-
uses: "arduino/setup-protoc@v3"
46-
with:
47-
version: "24.4"
48-
- name: "Install Homebrew & gRPC"
49-
run: |
50-
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
51-
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bash_profile
52-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
53-
brew install grpc
54-
which grpc_ruby_plugin
55-
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
5630
- name: "Install buf"
5731
uses: "bufbuild/[email protected]"
5832
with:
5933
github_token: ${{ secrets.GITHUB_TOKEN }}
6034
if: steps.buf-update.outputs.updated == 'true'
6135
- name: "Run buf generate"
6236
if: steps.buf-update.outputs.updated == 'true'
63-
run: |
64-
./buf.gen.yaml
37+
run: "buf generate"
6538
- name: Create Pull Request
6639
uses: peter-evans/[email protected]
6740
if: steps.buf-update.outputs.updated == 'true'
6841
with:
6942
delete-branch: "true"
7043
title: Update API to ${{ inputs.buftag }}
7144
branch: api-change/${{ inputs.buftag }}
45+
base: "main"
7246
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/publish.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "Publish gem to Rubygems"
23
on:
34
push:

Diff for: buf.gen.yaml

100755100644
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/usr/bin/env -S buf generate --template
1+
---
22
version: "v2"
33
plugins:
4-
- protoc_builtin: "ruby"
5-
out: "lib"
6-
- local: "grpc_ruby_plugin"
7-
out: "lib"
4+
- remote: "buf.build/protocolbuffers/ruby:v28.3"
5+
out: "lib"
6+
- remote: "buf.build/grpc/ruby:v1.67.1"
7+
out: "lib"
88
inputs:
9-
- module: buf.build/authzed/api:v1.37.0
9+
- module: "buf.build/authzed/api:v1.38.0"

Diff for: lib/authzed/api/v1/error_reason_pb.rb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/authzed/api/v1/permission_service_pb.rb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/authzed/api/v1/permission_service_services_pb.rb

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/authzed/api/v1/watch_service_pb.rb

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)