File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Checking if current tag matches the package version
4+ current_tag=$( echo $GITHUB_REF | tr -d ' refs/tags/v' )
5+ file_tag=$( grep ' VERSION = ' lib/meilisearch/version.rb | cut -d ' =' -f 2- | tr -d ' ' | tr -d \' )
6+ if [ " $current_tag " != " $file_tag " ]; then
7+ echo " Error: the current tag does not match the version in package file(s)."
8+ echo " $current_tag vs $file_tag "
9+ exit 1
10+ fi
11+
12+ echo ' OK'
13+ exit 0
Original file line number Diff line number Diff line change 1+ name : Publish Gem
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ build :
10+ name : Build + Publish
11+ runs-on : ubuntu-20.04
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Set up Ruby 2.6
16+ uses : actions/setup-ruby@v1
17+ with :
18+ ruby-version : 2.6.x
19+ - name : Check release validity
20+ run : sh .github/scripts/check-release.sh
21+ - name : Publish to RubyGems
22+ run : |
23+ mkdir -p $HOME/.gem
24+ touch $HOME/.gem/credentials
25+ chmod 0600 $HOME/.gem/credentials
26+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27+ gem build meilisearch-rails.gemspec
28+ gem push *.gem
29+ env :
30+ GEM_HOST_API_KEY : ${{secrets.RUBYGEMS_AUTH_TOKEN}}
You can’t perform that action at this time.
0 commit comments