diff --git a/.github/workflows/automatic-api-update.yaml b/.github/workflows/automatic-api-update.yaml index 8bd6cae..ccc1317 100644 --- a/.github/workflows/automatic-api-update.yaml +++ b/.github/workflows/automatic-api-update.yaml @@ -25,7 +25,6 @@ jobs: - name: "Install ruby and dependencies" uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.3.0" bundler-cache: true - name: "Update package version" uses: authzed/actions/semver-update@main diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f1ef410..2f55992 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,6 @@ jobs: - uses: "actions/checkout@v4" - uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.3.5" bundler-cache: true - uses: "authzed/action-spicedb@v1" - name: "Install dependencies" @@ -30,7 +29,6 @@ jobs: - uses: "actions/checkout@v4" - uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.3.5" bundler-cache: true - uses: "arduino/setup-protoc@v3" with: diff --git a/.github/workflows/manual-api-update.yaml b/.github/workflows/manual-api-update.yaml index dc5a23a..b3cdc2f 100644 --- a/.github/workflows/manual-api-update.yaml +++ b/.github/workflows/manual-api-update.yaml @@ -29,7 +29,6 @@ jobs: - name: "Install ruby and dependencies" uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.3.0" bundler-cache: true - name: "Update package version" uses: authzed/actions/semver-update@main diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 55ce379..b42c769 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,14 +12,22 @@ jobs: - name: "Set up Ruby" uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.3.0" bundler-cache: true - name: "Install deps" run: | gem install bundler bundle install - - name: "Build and publish to Rubygems" - uses: "cadwallion/publish-rubygems-action@v1.1.0" + # Set the version at release time + - name: Write release version + run: | + VERSION=${GITHUB_REF_NAME#v} + echo Version: $VERSION + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Set version within package + run: "bundle exec bump set ${VERSION} --no-commit" + - name: "Build the package" + run: "bundle exec rake build" + - name: "Publish the package" + run: "bundle exec gem push pkg/*.gem" env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - RUBYGEMS_API_KEY : "${{ secrets.RUBYGEMS_API_KEY }}" + GEM_HOST_API_KEY : "${{ secrets.RUBYGEMS_API_KEY }}" diff --git a/.gitignore b/.gitignore index f1ebd46..00cc406 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ lib/authzed/api/v0/ lib/authzed/api/v1alpha1/ +pkg .bundle vendor +# This is intentionally omitted. +Gemfile.lock diff --git a/Gemfile b/Gemfile index 628f26d..6e6ba91 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,5 @@ source "https://rubygems.org" +# NOTE: this tells bundle to look at the gemspec +# file for information about dependencies etc. gemspec - -group :development, :test do - gem "rake" -end diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 6604faa..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,46 +0,0 @@ -PATH - remote: . - specs: - authzed (0.12.0) - grpc (~> 1.41) - grpc-tools (~> 1.41) - -GEM - remote: https://rubygems.org/ - specs: - bigdecimal (3.1.8) - diff-lcs (1.5.1) - google-protobuf (4.28.2) - bigdecimal - rake (>= 13) - googleapis-common-protos-types (1.16.0) - google-protobuf (>= 3.18, < 5.a) - grpc (1.66.0) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc-tools (1.66.0) - rake (13.2.1) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-core (3.13.1) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - -PLATFORMS - ruby - -DEPENDENCIES - authzed! - rake - rspec (~> 3.0) - -BUNDLED WITH - 2.2.8 diff --git a/authzed.gemspec b/authzed.gemspec index 7861e8d..4c3990c 100644 --- a/authzed.gemspec +++ b/authzed.gemspec @@ -1,6 +1,8 @@ Gem::Specification.new do |s| s.name = "authzed" - s.version = "0.12.0" + # NOTE: version is managed programmatically at release time + # and reflects the associated git tag. + s.version = "1.0.0" s.licenses = ["Apache-2.0"] s.summary = "Ruby bindings for Authzed API" s.description = "Authzed is the best way to build robust and scalable permissions systems. See https://authzed.com for more details." @@ -18,5 +20,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency "grpc", "~> 1.41" s.add_runtime_dependency "grpc-tools", "~> 1.41" - s.add_development_dependency "rspec", "~> 3.0" + s.add_development_dependency "rspec", "~> 3" + s.add_development_dependency "rake", "~> 13" + s.add_development_dependency "bump", "~> 0.10" end