File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ timeout-minutes : 10
12+ permissions :
13+ id-token : write
14+ contents : read
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Set up Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : " 3.3"
22+ bundler-cache : true
23+
24+ - name : Verify tag matches Infisical::VERSION
25+ run : |
26+ TAG_VERSION="${GITHUB_REF_NAME#v}"
27+ GEM_VERSION="$(ruby -r ./lib/infisical/version -e 'puts Infisical::VERSION')"
28+ if [ "$TAG_VERSION" != "$GEM_VERSION" ]; then
29+ echo "::error::Tag ${GITHUB_REF_NAME} does not match Infisical::VERSION (${GEM_VERSION})."
30+ echo "::error::Bump lib/infisical/version.rb on main, then re-tag."
31+ exit 1
32+ fi
33+
34+ - name : Run tests
35+ run : bundle exec rspec
36+
37+ - name : Run rubocop
38+ run : bundle exec rubocop
39+
40+ - name : Configure RubyGems credentials (trusted publishing)
41+ uses : rubygems/configure-rubygems-credentials@v1
42+
43+ - name : Build gem
44+ run : gem build infisical-sdk.gemspec
45+
46+ - name : Push to RubyGems
47+ run : gem push "infisical-sdk-${GITHUB_REF_NAME#v}.gem"
You can’t perform that action at this time.
0 commit comments