Skip to content

Commit

Permalink
Merge branch 'master' into cbt-fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanli-ml committed Dec 23, 2020
2 parents ff2de94 + 1648ea0 commit 24cd371
Show file tree
Hide file tree
Showing 387 changed files with 7,269 additions and 1,567 deletions.
4 changes: 0 additions & 4 deletions .github/release-please.yml

This file was deleted.

131 changes: 131 additions & 0 deletions .github/workflows/release-submodule.yaml
@@ -0,0 +1,131 @@
# This action looks at the commit history since the last release, and uses
# this to decide which submodules require an update:
on:
push:
branches:
- master
name: release-please-submodule
jobs:
# This logic looks at commits that have occurred since GitHub's magic
# latestRelease:
# https://developer.github.com/v3/repos/releases/#get-the-latest-release
# TODO: it would be better if we retrieved a list of all prior releases,
# and found the oldest release within the SUB_MODULES array. We need this
# logic for other libraries as well, and would like to pull this logic
# into its own action.
changeFinder:
runs-on: ubuntu-latest
outputs:
submodules: ${{ steps.interrogate.outputs.submodules }}
steps:
- uses: actions/checkout@v2
- id: interrogate
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const {execSync} = require('child_process');
const SUB_MODULES = [
'bigtable',
'bigquery',
'datastore',
'firestore',
'logging',
'pubsub',
'pubsublite',
'spanner',
'storage',
];
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
const latestRelease = await github.repos.getLatestRelease({
owner,
repo
});
console.info(`latest release: ${latestRelease.data.tag_name}`);
// pull all tags, so we can get diff between HEAD and last release:
execSync('git pull --tags');
execSync(`git reset --hard ${latestRelease.data.tag_name}`);
const status = execSync(`git diff --name-only origin/master`, { encoding: 'utf-8'});
console.info(status);
const changes = status.split('\n');
const submodules = new Set();
for (const change of changes) {
const library = change.split('/')[0];
console.info(`update to path ${library}`);
if (SUB_MODULES.includes(library)) {
submodules.add(library);
}
}
console.log(`::set-output name=submodules::${JSON.stringify(Array.from(submodules))}`);
release-pr: # Create the release PR based on commit history:
runs-on: ubuntu-latest
needs: changeFinder
strategy:
fail-fast: false
matrix:
package: ${{fromJson(needs.changeFinder.outputs.submodules)}}
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release-please
with:
path: ${{ matrix.package }}
token: ${{ secrets.FORKING_TOKEN }}
fork: true
release-type: go
package-name: ${{ matrix.package }}
monorepo-tags: true
command: release-pr
- uses: actions/github-script@v3
id: label # Adds the "autorelease: pending" label.
if: ${{steps.release-please.outputs.pr}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
const latestRelease = await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.release-please.outputs.pr}},
labels: ['autorelease: pending']
});
console.log(`Tagged ${{steps.release-please.outputs.pr}}`)
release-please-release: # Actually create a release tag.
runs-on: ubuntu-latest
needs: changeFinder
strategy:
fail-fast: false
matrix:
package: ${{fromJson(needs.changeFinder.outputs.submodules)}}
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: tag-release
with:
path: ${{ matrix.package }}
changelog-path: CHANGES.md
token: ${{ secrets.GITHUB_TOKEN }}
release-type: go
monorepo-tags: true
package-name: ${{ matrix.package }}
command: github-release
# Add the "autorelease: published" and remove tagged, this allows
# monitoring to be enabled that detects failed releases:
- uses: actions/github-script@v3
id: untag-release
if: ${{steps.tag-release.outputs.pr}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.tag-release.outputs.pr}},
labels: ['autorelease: published']
});
github.issues.removeLabel({
owner,
repo,
issue_number: ${{steps.tag-release.outputs.pr}},
name: 'autorelease: tagged',
});
console.log(`Tagged ${{steps.tag-release.outputs.pr}}`)
67 changes: 67 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,67 @@
# This workflow creates release PRs and tags the top level release for
# the top level repository:
on:
push:
branches:
- master
name: release-please
jobs:
release-please-pr:
runs-on: ubuntu-latest
steps:
- id: release-pr # Open the release PR from a fork.
uses: GoogleCloudPlatform/release-please-action@v2
with:
# token: ${{ secrets.FORKING_TOKEN }}
token: ${{ secrets.FORKING_TOKEN }}
release-type: go
fork: true
package-name: google-cloud-go
command: release-pr
- uses: actions/github-script@v3
id: label # Add the magic "autorelease: pending" label.
if: ${{ steps.release-pr.outputs.pr }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.release-pr.outputs.pr}},
labels: ['autorelease: pending']
});
console.log(`Tagged ${{steps.release-pr.outputs.pr}}`)
release-please-release: # Actually tag the release.
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: tag-release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: go
package-name: google-cloud-go
command: github-release
changelog-path: CHANGES.md
# Add the "autorelease: published" and remove tagged, this allows
# monitoring to be enabled that detects failed releases:
- uses: actions/github-script@v3
id: untag-release
if: ${{steps.tag-release.outputs.pr}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.tag-release.outputs.pr}},
labels: ['autorelease: published']
});
github.issues.removeLabel({
owner,
repo,
issue_number: ${{steps.tag-release.outputs.pr}},
name: 'autorelease: tagged',
});
console.log(`Tagged ${{steps.tag-release.outputs.pr}}`)
14 changes: 14 additions & 0 deletions CHANGES.md
@@ -1,6 +1,20 @@
# Changes


## [0.74.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.73.0...v0.74.0) (2020-12-10)


### Features

* **all:** auto-regenerate gapics , refs [#3440](https://www.github.com/googleapis/google-cloud-go/issues/3440) [#3436](https://www.github.com/googleapis/google-cloud-go/issues/3436) [#3394](https://www.github.com/googleapis/google-cloud-go/issues/3394) [#3391](https://www.github.com/googleapis/google-cloud-go/issues/3391) [#3374](https://www.github.com/googleapis/google-cloud-go/issues/3374)
* **internal/gapicgen:** support generating only gapics with genlocal ([#3383](https://www.github.com/googleapis/google-cloud-go/issues/3383)) ([eaa742a](https://www.github.com/googleapis/google-cloud-go/commit/eaa742a248dc7d93c019863248f28e37f88aae84))
* **servicedirectory:** start generating apiv1 ([#3382](https://www.github.com/googleapis/google-cloud-go/issues/3382)) ([2774925](https://www.github.com/googleapis/google-cloud-go/commit/2774925925909071ebc585cf7400373334c156ba))


### Bug Fixes

* **internal/gapicgen:** don't create genproto pr as draft ([#3379](https://www.github.com/googleapis/google-cloud-go/issues/3379)) ([517ab0f](https://www.github.com/googleapis/google-cloud-go/commit/517ab0f25e544498c5374b256354bc41ba936ad5))

## [0.73.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.72.0...v0.73.0) (2020-12-04)


Expand Down
10 changes: 9 additions & 1 deletion README.md
@@ -1,6 +1,6 @@
# Google Cloud Client Libraries for Go

[![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://pkg.go.dev/cloud.google.com/go)
[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go.svg)](https://pkg.go.dev/cloud.google.com/go)

Go packages for [Google Cloud Platform](https://cloud.google.com) services.

Expand Down Expand Up @@ -175,3 +175,11 @@ for more information.
[cloud-video]: https://cloud.google.com/video-intelligence/
[cloud-vision]: https://cloud.google.com/vision
[cloud-webrisk]: https://cloud.google.com/web-risk/

## Links

- [Go on Google Cloud](https://cloud.google.com/go/home)
- [Getting started with Go on Google Cloud](https://cloud.google.com/go/getting-started)
- [App Engine Quickstart](https://cloud.google.com/appengine/docs/standard/go/quickstart)
- [Cloud Functions Quickstart](https://cloud.google.com/functions/docs/quickstart-go)
- [Cloud Run Quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#go)
3 changes: 2 additions & 1 deletion accessapproval/apiv1/access_approval_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions accessapproval/apiv1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion analytics/admin/apiv1alpha/analytics_admin_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions analytics/admin/apiv1alpha/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion analytics/data/apiv1alpha/alpha_analytics_data_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions analytics/data/apiv1alpha/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions area120/tables/apiv1alpha1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion area120/tables/apiv1alpha1/tables_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions artifactregistry/apiv1beta2/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion asset/apiv1/asset_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion asset/apiv1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 24cd371

Please sign in to comment.