| 1 |
name: Automation - Release Branch |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
tags: |
| 6 |
# Trigger on beta version tags (0.x.x series) to create release branch |
| 7 |
# This pattern matches: v0.{minor}.{patch} for new releases and bugfix releases |
| 8 |
- 'v0.[0-9]+.[0-9]+' |
| 9 |
- 'v0.[0-9]+.[0-9]+-*' # Also support release candidates if needed |
| 10 |
|
| 11 |
permissions: |
| 12 |
contents: read |
| 13 |
|
| 14 |
jobs: |
| 15 |
release-branch: |
| 16 |
runs-on: ubuntu-latest |
| 17 |
permissions: |
| 18 |
contents: write |
| 19 |
steps: |
| 20 |
- name: Checkout repository |
| 21 |
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 |
| 22 |
with: |
| 23 |
fetch-depth: 0 |
| 24 |
|
| 25 |
- name: Setup Go |
| 26 |
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 |
| 27 |
with: |
| 28 |
go-version: oldstable |
| 29 |
cache: false |
| 30 |
|
| 31 |
- name: Cache Go |
| 32 |
id: go-cache |
| 33 |
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
| 34 |
with: |
| 35 |
path: | |
| 36 |
~/go/bin |
| 37 |
~/go/pkg/mod |
| 38 |
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }} |
| 39 |
|
| 40 |
- name: Setup Git config |
| 41 |
run: | |
| 42 |
git config --global user.name "otelbot" |
| 43 |
git config --global user.email "[email protected]" |
| 44 |
|
| 45 |
- name: Run release-branch.sh |
| 46 |
run: | |
| 47 |
./.github/workflows/scripts/release-branch.sh |
| 48 |
env: |
| 49 |
UPSTREAM_REMOTE_NAME: "origin" |
| 50 |
MAIN_BRANCH_NAME: "main" |
| 51 |
GITHUB_REF: ${{ github.ref }} |