forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease_create_release_branch.yaml
More file actions
46 lines (38 loc) · 1.2 KB
/
Copy pathrelease_create_release_branch.yaml
File metadata and controls
46 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "Release: Create Release Branch"
on:
issues:
types: [edited]
permissions:
contents: write
issues: write
jobs:
cut_branch:
# Run only if the issue has the type: release label
if: contains(github.event.issue.labels.*.name, 'type: release')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
- name: Configure Git Identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Attempt Branch Creation
run: |
bazel run //tools/private/release -- \
create-release-branch --issue ${{ github.event.issue.number }} --remote origin
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# A no-op job that always runs to prevent "no jobs ran" failures
# when the main job is skipped.
suppress-no-jobs-ran-error:
runs-on: ubuntu-latest
steps:
- name: Echo Success
run: echo "Success"