name: Publish on: push: tags: - v* jobs: build: name: Build + Publish runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: version: 2.6.x - name: Configure Bundler run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: ${GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}" > $HOME/.gem/credentials env: GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN: ${{secrets.GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}} - name: Build Gem run: | gem build *.gemspec - name: Publish to RubyGems run: | gem push *.gem - name: Publish to Github Package Repository run: | gem push --key github --host https://rubygems.pkg.github.com/kyledecot *.gem