diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml new file mode 100644 index 00000000..8bcc9e94 --- /dev/null +++ b/.github/workflows/gem-push.yml @@ -0,0 +1,35 @@ +name: Ruby Gem + +on: + push: + branches: [ master ] + paths: ['lib/trusty_cms.rb'] + +jobs: + build: + name: Build + Publish + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Publish to RubyGems + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" + + - name: Remove gem build file + run: rm *.gem diff --git a/lib/trusty_cms.rb b/lib/trusty_cms.rb index a80cd3a6..ef7ebb72 100644 --- a/lib/trusty_cms.rb +++ b/lib/trusty_cms.rb @@ -2,6 +2,6 @@ unless defined? TrustyCms::VERSION module TrustyCms - VERSION = '5.0.7'.freeze + VERSION = '5.0.8'.freeze end end