Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release process #133

Merged
merged 15 commits into from
Oct 4, 2024
1 change: 0 additions & 1 deletion .github/workflows/automatic-api-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: "Install ruby and dependencies"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.3.0"
vroldanbet marked this conversation as resolved.
Show resolved Hide resolved
bundler-cache: true
- name: "Update package version"
uses: authzed/actions/semver-update@main
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/manual-api-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
vroldanbet marked this conversation as resolved.
Show resolved Hide resolved
# 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 }}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib/authzed/api/v0/
lib/authzed/api/v1alpha1/
pkg
.bundle
vendor
# This is intentionally omitted.
Gemfile.lock
6 changes: 2 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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
46 changes: 0 additions & 46 deletions Gemfile.lock

This file was deleted.

8 changes: 6 additions & 2 deletions authzed.gemspec
Original file line number Diff line number Diff line change
@@ -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."
Expand All @@ -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
Loading