name: Publish to Rubygems on: push: tags: - '*' jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - name: Install dependencies run: bundle install - name: gem build run: gem build tlapse.gemspec - name: gem push env: GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} run: | tag=$(git describe --tags) tag=${tag:1} gem push "tlapse-$tag.gem"