name: Release on: release: types: [ released ] jobs: build-and-push: name: Build and push gem runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.3 bundler-cache: true - name: Setup credentials run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials env: RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} - name: Release gem run: | bundle exec rake release