From 5b8ed04153b3d3c44cdd147a51c51962c90989a4 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Mon, 10 Feb 2020 11:33:46 -0800 Subject: [PATCH 1/2] Updated release trigger mechanisms --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b51ace956..bc085a63f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,13 @@ on: jobs: stage_release: - # If triggered by a PR it must contain the label 'release:build'. + # To publish a release, merge the release PR with the label 'release:publish'. + # To stage a release without publishing it, send a 'firebase_build' event or apply + # the 'release:stage' label to a PR. if: github.event.action == 'firebase_build' || - contains(github.event.pull_request.labels.*.name, 'release:build') + contains(github.event.pull_request.labels.*.name, 'release:stage') || + (github.event.pull_request.merged && + contains(github.event.pull_request.labels.*.name, 'release:publish')) runs-on: ubuntu-latest @@ -78,9 +82,11 @@ jobs: # Check whether the release should be published. We publish only when the trigger PR is # 1. merged # 2. to the master branch - # 3. with the title prefix '[chore] Release '. + # 3. with the label 'release:publish', and + # 4. the title prefix '[chore] Release '. if: github.event.pull_request.merged && github.ref == 'master' && + contains(github.event.pull_request.labels.*.name, 'release:publish') && startsWith(github.event.pull_request.title, '[chore] Release ') runs-on: ubuntu-latest From 8cfa42ce44fd7d6718f8681ff93ea38518c56052 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Mon, 10 Feb 2020 16:04:47 -0800 Subject: [PATCH 2/2] Added license information to scripts --- .github/scripts/generate_changelog.sh | 14 ++++++++++++++ .github/scripts/publish_preflight_check.sh | 15 +++++++++++++++ .github/scripts/run_integration_tests.sh | 14 ++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/.github/scripts/generate_changelog.sh b/.github/scripts/generate_changelog.sh index 3c97dca0c..e393f40e4 100755 --- a/.github/scripts/generate_changelog.sh +++ b/.github/scripts/generate_changelog.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright 2020 Google Inc. +# +# 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. + set -e set -u diff --git a/.github/scripts/publish_preflight_check.sh b/.github/scripts/publish_preflight_check.sh index eaf0270f8..6b7b36180 100755 --- a/.github/scripts/publish_preflight_check.sh +++ b/.github/scripts/publish_preflight_check.sh @@ -1,5 +1,20 @@ #!/bin/bash +# Copyright 2020 Google Inc. +# +# 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. + + ###################################### Outputs ##################################### # 1. version: The version of this release including the 'v' prefix (e.g. v1.2.3). diff --git a/.github/scripts/run_integration_tests.sh b/.github/scripts/run_integration_tests.sh index 060c5ba9f..96b0ad75d 100755 --- a/.github/scripts/run_integration_tests.sh +++ b/.github/scripts/run_integration_tests.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright 2020 Google Inc. +# +# 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. + set -e set -u