Ruby 4.0.0 has been released, so this PR adds Ruby 4.0 to CI. https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/ To prevent the CI label from showing "CI / Test Ruby 4" instead of "CI / Test Ruby 4.0", the matrix entries are changed from floats to strings.
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
name: Release new version
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "lib/mcp/version.rb"
|
|
jobs:
|
|
publish_gem:
|
|
if: github.repository_owner == 'modelcontextprotocol'
|
|
name: Release Gem Version to RubyGems.org
|
|
runs-on: ubuntu-latest
|
|
|
|
environment: release
|
|
|
|
permissions:
|
|
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
ruby-version: 4.0
|
|
- uses: rubygems/release-gem@v1
|
|
|
|
publish_gh_pages:
|
|
if: github.repository_owner == 'modelcontextprotocol'
|
|
name: Publish Documentation to GitHub Pages
|
|
runs-on: ubuntu-latest
|
|
needs: [publish_gem]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0 # Fetch all history for all branches and tags
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Get version tag
|
|
id: version
|
|
run: |
|
|
git fetch --tags
|
|
TAG=$(git describe --tags --exact-match HEAD)
|
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Generate GitHub Pages
|
|
run: ./bin/generate-gh-pages.sh ${{ steps.version.outputs.tag }}
|
|
|
|
- name: Push to gh-pages
|
|
run: git push origin gh-pages
|