-
Notifications
You must be signed in to change notification settings - Fork 875
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update release process to use the common Ruby release scripts (#…
- Loading branch information
Showing
13 changed files
with
142 additions
and
124 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: release-please-label | ||
on: | ||
pull_request_target: | ||
branches: | ||
- master | ||
types: | ||
- opened | ||
jobs: | ||
release-please-label: | ||
if: "${{ github.event.sender.login == 'yoshi-code-bot' && startsWith(github.event.pull_request.title, 'chore: release ') }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ReleaseLabel | ||
uses: actions/github-script@v4 | ||
with: | ||
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} | ||
script: | | ||
core.info('Labeling release'); | ||
await github.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.pull_request.number, | ||
labels: ['autorelease: pending'] | ||
}); | ||
core.info('Labeled'); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release-Please | ||
on: | ||
schedule: | ||
- cron: '37 8 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
gem: | ||
description: "Name of single gem to release. Leave blank to check all gems." | ||
required: false | ||
args: | ||
description: "Extra command line arguments." | ||
required: false | ||
|
||
jobs: | ||
release-please: | ||
if: ${{ github.repository == 'googleapis/google-api-ruby-client' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} | ||
RELEASE_PLEASE_DISABLE: ${{ secrets.RELEASE_PLEASE_DISABLE }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Install Ruby 2.7 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "2.7" | ||
- name: Install NodeJS 12.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12.x" | ||
- name: Install tools | ||
run: "gem install --no-document toys && npm install release-please" | ||
- name: execute | ||
run: | | ||
toys release please -v --fork \ | ||
--github-event-name=${{ github.event_name }} \ | ||
${{ github.event.inputs.args }} -- ${{ github.event.inputs.gem }} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ atlassian* | |
|
||
__pycache__/ | ||
/vendor/ | ||
|
||
/node-modules/ | ||
/package-lock.json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Build logs will be here | ||
action { | ||
define_artifacts { | ||
regex: "**/*sponge_log.xml" | ||
} | ||
} | ||
|
||
# Download resources for system tests (service account key, etc.) | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby" | ||
|
||
# Download trampoline resources. | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
||
# Use the trampoline script to run in docker. | ||
build_file: "google-api-ruby-client/.kokoro/trampoline_v2.sh" | ||
|
||
# Configure the docker image for kokoro-trampoline. | ||
env_vars: { | ||
key: "TRAMPOLINE_IMAGE" | ||
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release" | ||
} | ||
|
||
env_vars: { | ||
key: "SECRET_MANAGER_KEYS" | ||
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,docuploader_service_account" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: ".kokoro/release-generated.sh" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
# Install gems in the user directory because the default install directory | ||
# is in a read-only location. | ||
export GEM_HOME=$HOME/.gem | ||
export PATH=$GEM_HOME/bin:$PATH | ||
|
||
python3 -m pip install git+https://github.com/googleapis/releasetool | ||
python3 -m pip install gcp-docuploader | ||
gem install --no-document toys | ||
|
||
# This is not called from autorelease, so don't run publish-reporter-script | ||
toys release perform -v --base_dir=generated --all=google-apis- --enable-docs --enable-rad < /dev/null |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: ".kokoro/release.sh" | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
load_git remote: "https://github.com/googleapis/ruby-common-tools.git", | ||
path: "toys/release" |
This file contains 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