Skip to content

Commit 08ed809

Browse files
authored
Updated release trigger mechanisms (#409)
* Updated release trigger mechanisms * Added license information to scripts
1 parent a4f2bda commit 08ed809

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

.github/scripts/generate_changelog.sh

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22

3+
# Copyright 2020 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
317
set -e
418
set -u
519

.github/scripts/publish_preflight_check.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
#!/bin/bash
22

3+
# Copyright 2020 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
318
###################################### Outputs #####################################
419

520
# 1. version: The version of this release including the 'v' prefix (e.g. v1.2.3).

.github/scripts/run_integration_tests.sh

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22

3+
# Copyright 2020 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
317
set -e
418
set -u
519

.github/workflows/release.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ on:
2626

2727
jobs:
2828
stage_release:
29-
# If triggered by a PR it must contain the label 'release:build'.
29+
# To publish a release, merge the release PR with the label 'release:publish'.
30+
# To stage a release without publishing it, send a 'firebase_build' event or apply
31+
# the 'release:stage' label to a PR.
3032
if: github.event.action == 'firebase_build' ||
31-
contains(github.event.pull_request.labels.*.name, 'release:build')
33+
contains(github.event.pull_request.labels.*.name, 'release:stage') ||
34+
(github.event.pull_request.merged &&
35+
contains(github.event.pull_request.labels.*.name, 'release:publish'))
3236

3337
runs-on: ubuntu-latest
3438

@@ -78,9 +82,11 @@ jobs:
7882
# Check whether the release should be published. We publish only when the trigger PR is
7983
# 1. merged
8084
# 2. to the master branch
81-
# 3. with the title prefix '[chore] Release '.
85+
# 3. with the label 'release:publish', and
86+
# 4. the title prefix '[chore] Release '.
8287
if: github.event.pull_request.merged &&
8388
github.ref == 'master' &&
89+
contains(github.event.pull_request.labels.*.name, 'release:publish') &&
8490
startsWith(github.event.pull_request.title, '[chore] Release ')
8591

8692
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)