chore: Update release-please jobs to reference separate gems (#2146)

This commit is contained in:
Daniel Azuma 2021-01-06 12:02:24 -08:00 committed by GitHub
parent 85563df3b2
commit dc32a62280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 119 additions and 2 deletions

58
.github/workflows/release-core.yml vendored Normal file
View File

@ -0,0 +1,58 @@
on:
schedule:
- cron: '29 8 * * 1'
workflow_dispatch:
name: release-core
jobs:
release-please:
env:
ENABLE_AUTO_APPROVE: ${{ secrets.ENABLE_AUTO_APPROVE }}
ENABLE_RELEASE_PLEASE: ${{ secrets.ENABLE_RELEASE_PLEASE }}
runs-on: ubuntu-latest
steps:
- name: ReleasePlease
id: release-please
if: ${{ env.ENABLE_RELEASE_PLEASE }}
uses: GoogleCloudPlatform/release-please-action@v2
with:
command: release-pr
token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
fork: true
release-type: ruby
path: google-apis-core
package-name: google-apis-core
version-file: lib/google/apis/core/version.rb
monorepo-tags: true
bump-minor-pre-major: true
- name: AutoApprove
id: auto-approve
if: ${{ steps.release-please.outputs.pr }}
uses: actions/github-script@v2
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
if (process.env.ENABLE_AUTO_APPROVE) {
core.info("ENABLE_AUTO_APPROVE is set; labeling and approving");
github.pulls.createReview({
owner: 'googleapis',
repo: 'google-api-ruby-client',
body: "AutoApprove: Rubber stamped release!",
pull_number: ${{ steps.release-please.outputs.pr }},
event: "APPROVE"
});
github.issues.addLabels({
owner: 'googleapis',
repo: 'google-api-ruby-client',
issue_number: ${{ steps.release-please.outputs.pr }},
labels: ["autorelease: pending", "automerge", "kokoro:force-run"]
});
} else {
core.info("ENABLE_AUTO_APPROVE is not set; labeling release only");
github.issues.addLabels({
owner: 'googleapis',
repo: 'google-api-ruby-client',
issue_number: ${{ steps.release-please.outputs.pr }},
labels: ["autorelease: pending", "kokoro:force-run"]
});
}

58
.github/workflows/release-generator.yml vendored Normal file
View File

@ -0,0 +1,58 @@
on:
schedule:
- cron: '39 8 * * 1'
workflow_dispatch:
name: release-generator
jobs:
release-please:
env:
ENABLE_AUTO_APPROVE: ${{ secrets.ENABLE_AUTO_APPROVE }}
ENABLE_RELEASE_PLEASE: ${{ secrets.ENABLE_RELEASE_PLEASE }}
runs-on: ubuntu-latest
steps:
- name: ReleasePlease
id: release-please
if: ${{ env.ENABLE_RELEASE_PLEASE }}
uses: GoogleCloudPlatform/release-please-action@v2
with:
command: release-pr
token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
fork: true
release-type: ruby
path: google-apis-generator
package-name: google-apis-generator
version-file: lib/google/apis/generator/version.rb
monorepo-tags: true
bump-minor-pre-major: true
- name: AutoApprove
id: auto-approve
if: ${{ steps.release-please.outputs.pr }}
uses: actions/github-script@v2
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
if (process.env.ENABLE_AUTO_APPROVE) {
core.info("ENABLE_AUTO_APPROVE is set; labeling and approving");
github.pulls.createReview({
owner: 'googleapis',
repo: 'google-api-ruby-client',
body: "AutoApprove: Rubber stamped release!",
pull_number: ${{ steps.release-please.outputs.pr }},
event: "APPROVE"
});
github.issues.addLabels({
owner: 'googleapis',
repo: 'google-api-ruby-client',
issue_number: ${{ steps.release-please.outputs.pr }},
labels: ["autorelease: pending", "automerge", "kokoro:force-run"]
});
} else {
core.info("ENABLE_AUTO_APPROVE is not set; labeling release only");
github.issues.addLabels({
owner: 'googleapis',
repo: 'google-api-ruby-client',
issue_number: ${{ steps.release-please.outputs.pr }},
labels: ["autorelease: pending", "kokoro:force-run"]
});
}

View File

@ -3,7 +3,7 @@ on:
- cron: '49 8 * * 1'
workflow_dispatch:
name: release-please
name: release-umbrella
jobs:
release-please:
env:
@ -20,7 +20,8 @@ jobs:
token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
fork: true
release-type: ruby
package-name: google-api-ruby-client
path: google-api-client
package-name: google-api-client
version-file: lib/google/apis/version.rb
monorepo-tags: true
bump-minor-pre-major: true