Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/release-hook-on-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Process release request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
toys release _onclosed --verbose \
"--enable-releases=${{ secrets.ENABLE_RELEASES }}" \
"--event-path=${{ github.event_path }}" \
"--rubygems-api-key=${{ secrets.RUBYGEMS_API_KEY }}" \
< /dev/null
4 changes: 2 additions & 2 deletions .github/workflows/release-hook-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Update open releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release-perform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Force release
on:
workflow_dispatch:
inputs:
gem:
description: Gem to release
name:
description: Component to release
required: true
version:
description: Version to release
Expand All @@ -22,24 +22,25 @@ jobs:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby' }}
permissions:
contents: write # required for creating releases
pull-requests: write # required for updating label on PR, posting comments
issues: write # required for creating new issues on failed releases
runs-on: ubuntu-latest
steps:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Perform release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
toys release perform --yes --verbose \
"--enable-releases=${{ secrets.ENABLE_RELEASES }}" \
"--release-sha=${{ github.sha }}" \
"--rubygems-api-key=${{ secrets.RUBYGEMS_API_KEY }}" \
"--release-ref=${{ github.sha }}" \
${{ github.event.inputs.flags }} \
"${{ github.event.inputs.gem }}" "${{ github.event.inputs.version }}" \
"${{ github.event.inputs.name }}" "${{ github.event.inputs.version }}" \
< /dev/null
6 changes: 3 additions & 3 deletions .github/workflows/release-request-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Create otelbot app token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: app-token
Expand All @@ -35,5 +35,5 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
toys release request --yes --verbose \
"--release-ref=${{ github.ref }}" \
"--target-branch=${{ github.ref }}" \
< /dev/null
12 changes: 6 additions & 6 deletions .github/workflows/release-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Open release request
on:
workflow_dispatch:
inputs:
gems:
description: Gems to release (leave blank to release all gems)
names:
description: Components to release (leave blank to release all components)
required: false
default: ""

Expand All @@ -22,11 +22,11 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Create otelbot app token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: app-token
Expand All @@ -39,6 +39,6 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
toys release request --yes --verbose \
"--gems=${{ github.event.inputs.gems }}" \
"--release-ref=${{ github.ref }}" \
"--target-branch=${{ github.ref }}" \
${{ github.event.inputs.names }} \
< /dev/null
9 changes: 4 additions & 5 deletions .github/workflows/release-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,24 @@ jobs:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby' }}
permissions:
contents: write # required for creating releases
pull-requests: write # required for updating open release PRs
pull-requests: write # required for updating label on PR, posting comments
issues: write # required for creating new issues on failed releases
runs-on: ubuntu-latest
steps:
- name: Install Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.1
ruby-version: "4.0"
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
run: "gem install --no-document toys -v 0.19.1"
- name: Retry release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
toys release retry --yes --verbose \
"--enable-releases=${{ secrets.ENABLE_RELEASES }}" \
"--rubygems-api-key=${{ secrets.RUBYGEMS_API_KEY }}" \
${{ github.event.inputs.flags }} \
"${{ github.event.inputs.release_pr }}" \
< /dev/null
41 changes: 16 additions & 25 deletions .toys/.data/releases.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
# This file controls the release system.
# This file controls the toys-release gem.

# The repo organization and name.
repo: open-telemetry/opentelemetry-ruby
# The main branch name. Releases must happen on this branch.
main_branch: main

# Time in seconds for release scripts to wait for CI to complete.
required_checks_timeout: 1200

# Git user attached to commits for release pull requests.
git_user_name: otelbot
git_user_email: [email protected]
# Toys tool that builds YARD reference docs
docs_builder_tool: [yardoc]

# Control the conventional commit linter.
commit_lint:
# Whether conventional commit errors should cause a GitHub check fail.
fail_checks: true
# Merge types allowed by the repo.
merge: squash

# List of all releaseable gems. Each gem should include:
# * name: The name of the gem. (Required.)
# * directory: Gem directory relative to the repo root. (Required.)
# * directory: Gem directory relative to the repo root.
# (Required unless the gem name matches the directory name exactly. This
# means it's always required in this repo because all the gem names include
# the word "opentelemetry" whereas the directory names do not.)
# * version_rb_path: Path to version.rb relative to the gem directory.
# (Required only if it does not match the gem name. e.g. The gem
# "opentelemetry-sdk" would default to lib/opentelemetry/sdk/version.rb)
# "opentelemetry-sdk" would default to "lib/opentelemetry/sdk/version.rb",
# so this field is required only if the actual path is different.)
# * version_constant: The fully-qualified version constant as an array.
# (Required because the OpenTelemetry namespace does not match the gem
# name "opentelemetry".)
# (Required if the actual constant name, including its capitalization,
# differs from what would be inferred from the gem name. This means it's
# always required in this repo, because the capitalization of the
# "OpenTelemetry" namespace does not match the gem name "opentelemetry".)
# * changelog_path: Path to CHANGLEOG.md relative to the gem directory.
# (Required only if it is not in the expected location.)
# (Required only if it is not in the expected location, which is the file
# "CHANGELOG.md" at the root of the gem directory.)
gems:
- name: opentelemetry-api
directory: api
Expand All @@ -47,20 +45,14 @@ gems:

- name: opentelemetry-sdk-experimental
directory: sdk_experimental
version_rb_path: lib/opentelemetry/sdk/experimental/version.rb
version_constant: [OpenTelemetry, SDK, Experimental, VERSION]

- name: opentelemetry-common
directory: common
version_rb_path: lib/opentelemetry/common/version.rb
version_constant: [OpenTelemetry, Common, VERSION]

- name: opentelemetry-exporter-otlp
# we append a slash here to avoid the naive substring start_with? directory-matching condition in underlying toys gem
# which casues exporter/otlp to incorrectly match when changes occur in exporter/otlp-logs or exporter/otlp-metrics
# https://github.com/dazuma/toys/blob/17ed449da8299f272b834470ff6b279a59e8070b/.toys/release/.lib/release_utils.rb#L436
# https://github.com/open-telemetry/opentelemetry-ruby/issues/1792
directory: exporter/otlp/
directory: exporter/otlp
version_constant: [OpenTelemetry, Exporter, OTLP, VERSION]

- name: opentelemetry-exporter-otlp-logs
Expand All @@ -85,7 +77,6 @@ gems:

- name: opentelemetry-semantic_conventions
directory: semantic_conventions
version_rb_path: lib/opentelemetry/semantic_conventions/version.rb
version_constant: [OpenTelemetry, SemanticConventions, VERSION]

- name: opentelemetry-test-helpers
Expand Down
8 changes: 2 additions & 6 deletions .toys/.toys.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
toys_version! ">= 0.15.5"
# frozen_string_literal: true

load_git remote: "https://github.com/dazuma/toys.git",
path: ".toys/release",
as: "release",
commit: "common-tools/v0.15.5.1",
update: 3600
toys_version! ">= 0.19"
3 changes: 3 additions & 0 deletions .toys/release.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

load_gem "toys-release", "= 0.4.0"
Loading