Skip to content

Commit 4bd9ceb

Browse files
authored
Merge pull request #92 from IAPark/automate-release
Drop Ruby 3.1 support; automate release process
2 parents 9cd9879 + 24e4166 commit 4bd9ceb

8 files changed

Lines changed: 38 additions & 94 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ jobs:
2424
- run: bundle exec rake build
2525
- run: bundle exec rake spec
2626
lint:
27-
strategy:
28-
matrix:
29-
os: [ubuntu-latest]
30-
runs-on: ${{ matrix.os }}
27+
runs-on: ubuntu-latest
3128
steps:
3229
- uses: actions/checkout@v6
3330
- uses: ruby/setup-ruby@v1

.github/workflows/cross_compile.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tag and Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- "lib/tiktoken_ruby/version.rb"
10+
pull_request_target:
11+
types:
12+
- closed
13+
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
id-token: write
18+
actions: write
19+
20+
jobs:
21+
ruby:
22+
uses: gjtorikian/actions/.github/workflows/ruby_gem_release.yml@main
23+
secrets:
24+
gh_token: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
gem_name: tiktoken_ruby
27+
version_filepath: lib/tiktoken_ruby/version.rb
28+
oxidized: true
29+
prepare: ${{ github.event_name == 'push' }}
30+
release: ${{ github.event_name == 'workflow_dispatch' || ((github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'release'))) }}
31+
oidc_role_to_assume: rg_oidc_akr_3jwh8zr6mroh6nafxc7s

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
},
55
"[markdown]": {
66
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[github-actions-workflow]": {
9+
"editor.defaultFormatter": "redhat.vscode-yaml"
710
}
811
}

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
tiktoken_ruby (0.0.13)
4+
tiktoken_ruby (0.0.14)
55
rb_sys (~> 0.9)
66

77
GEM

lib/tiktoken_ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Tiktoken
4-
VERSION = "0.0.13"
4+
VERSION = "0.0.14"
55
end

script/release

Lines changed: 0 additions & 43 deletions
This file was deleted.

tiktoken_ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
1313
"count the number of tokens in text before sending it to OpenAI APIs."
1414
spec.homepage = "https://github.com/IAPark/tiktoken_ruby"
1515
spec.license = "MIT"
16-
spec.required_ruby_version = ">= 3.1.0"
16+
spec.required_ruby_version = ">= 3.2.0"
1717
spec.required_rubygems_version = ">= 3.4.0"
1818
spec.platform = Gem::Platform::RUBY
1919

0 commit comments

Comments
 (0)