Bump version #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - "release/*" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby-version: ['3.1', '3.2', '3.3', '3.4'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Ruby ${{ matrix.ruby-version }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Run test suite | |
| run: ./bin/test | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| BUNDLE_WITHOUT: development | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.2" | |
| bundler-cache: true | |
| - name: Determine version | |
| id: version | |
| run: | | |
| VERSION=$(bundle exec ruby -e "require_relative 'lib/ruby_llm/schema/version'; print RubyLlm::Schema::VERSION") | |
| echo "value=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Create and push tag | |
| run: | | |
| git tag "v${{ steps.version.outputs.value }}" | |
| git push origin "v${{ steps.version.outputs.value }}" | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "v${{ steps.version.outputs.value }}" | |
| generate_release_notes: true | |
| - name: Build gem | |
| run: gem build ruby_llm-schema.gemspec | |
| - name: Publish to RubyGems | |
| env: | |
| GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
| run: gem push "ruby_llm-schema-${{ steps.version.outputs.value }}.gem" |