-
Notifications
You must be signed in to change notification settings - Fork 284
57 lines (54 loc) · 1.9 KB
/
Copy pathrelease-request.yml
File metadata and controls
57 lines (54 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Open release request
on:
workflow_dispatch:
inputs:
names:
description: Components to release (leave blank to release all components)
required: false
default: ""
push:
branches:
- main
paths:
- "semantic_conventions/semconv.yaml"
permissions:
contents: read
jobs:
release-request:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby' }}
permissions:
contents: write # required for pushing changes
pull-requests: write # required for creating release PRs
runs-on: ubuntu-24.04
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.toys/release/Gemfile
steps:
- name: Checkout repo
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Ruby
uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af # v1.313.0
with:
ruby-version: "4.0.5"
bundler-cache: true
- name: Create otelbot app token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
client-id: ${{ vars.OTELBOT_RUBY_APP_ID }}
private-key: ${{ secrets.OTELBOT_RUBY_PRIVATE_KEY }}
- name: Determine releases
id: detect
if: ${{ github.event_name == 'push' }}
run: |
echo "components=opentelemetry-semantic_conventions" >> $GITHUB_OUTPUT
- name: Open release pull request
env:
# Use an app token instead of GITHUB_TOKEN to trigger workflows
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
RELEASE_NAMES: ${{ github.event.inputs.names || steps.detect.outputs.components }}
TARGET_BRANCH: ${{ github.ref }}
run: |
bundle exec toys release request --yes --verbose \
"--target-branch=$TARGET_BRANCH" \
$RELEASE_NAMES \
< /dev/null