trigger: - main pool: vmImage: 'ubuntu-latest' steps: - task: UseRubyVersion@0 inputs: versionSpec: '>= 2.7.1' addToPath: true displayName: 'Installing Ruby' - script: | which ruby - script: | gem install bundler bundle install --retry=3 --jobs=4 displayName: 'Installing Bundler and Gems' - script: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials echo '---\n:rubygems_api_key: rubygems_1fd6c5f192b50386baa0d9630e6abe29ff71ce544014ad32' >> $HOME/.gem/credentials gem build SaudeiD.gemspec displayName: Build Gem - script: | GEM_VERSION=$(cat lib/SaudeiD/version.rb | grep -P '\d\.\d\.\d' -o) gem push SaudeiD-$GEM_VERSION.gem displayName: Publish Gem