Skip to content

v1.0.2

v1.0.2 #2

name: Publish to RubyGems

Check failure on line 1 in .github/workflows/publish-to-rubygems.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-to-rubygems.yml

Invalid workflow file

(Line: 26, Col: 3): The workflow must contain at least one job with no dependencies.
on:
workflow_dispatch:
push:
tags:
- v*
pull_request:
branches: [main, master]
jobs:
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: "2.6"
# bundler-cache: true
#
# - name: Run tests
# run: bundle exec rspec spec --format progress
publish:
name: Build & Publish gem
needs: test
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment: release
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6"
bundler-cache: true
- name: Build gem
run: gem build lara-sdk.gemspec
- name: Configure RubyGems credentials (OIDC)
uses: rubygems/configure-rubygems-credentials@v1
- name: Publish gem
run: gem push lara-sdk-*.gem