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: ruby-version: 2.6.x - name: Configure Bundler run: | gem install bundler bundle install --jobs=3 --retry=3 mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: Bearer ${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: bundle exec ./bin/publish --rubygems - name: Publish to Github Package Repository run: bundle exec ./bin/publish --github