Skip to content

Commit

Permalink
Use github actions to cut release branch (#26434)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Apr 26, 2023
1 parent f72bffe commit f770c9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 171 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cut_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,25 @@

# To learn more about GitHub Actions in Apache Beam check the CI.md

# Workflow used after https://github.com/apache/beam/commit/4183e747becebd18becee5fff547af365910fc9c
# If help is needed debugging issues, you can view the cut_release_branch.sh script at that commit for guidance on how to do this manually.
# (https://github.com/apache/beam/blob/4183e747becebd18becee5fff547af365910fc9c/release/src/main/scripts/cut_release_branch.sh)
name: Cut Release Branch
on:
workflow_dispatch:
inputs:
RELEASE_VERSION:
description: Beam version of current release
required: true
default: '2.XX.0'
NEXT_VERSION:
description: Next release version
required: true
default: '2.XX.0'

jobs:
update_master:
runs-on: [self-hosted, ubuntu-20.04]
runs-on: ubuntu-latest
env:
MASTER_BRANCH: master
NEXT_RELEASE: ${{ github.event.inputs.NEXT_VERSION }}
Expand Down Expand Up @@ -67,7 +72,7 @@ jobs:
update_release_branch:
needs: update_master
runs-on: [self-hosted, ubuntu-20.04]
runs-on: ubuntu-latest
env:
RELEASE: ${{ github.event.inputs.RELEASE_VERSION }}
steps:
Expand Down Expand Up @@ -104,8 +109,3 @@ jobs:
git add runners/google-cloud-dataflow-java/build.gradle
git commit -m "Set Dataflow container to release version."
git push --set-upstream origin ${RELEASE_BRANCH}
147 changes: 0 additions & 147 deletions release/src/main/scripts/cut_release_branch.sh

This file was deleted.

20 changes: 3 additions & 17 deletions website/www/site/content/en/contribute/release-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,27 +274,13 @@ The key points to know:
- The release branch has the SNAPSHOT/dev version to be released.
- The Dataflow container image should be modified to the version to be released.

This will all be accomplished by the [cut_release_branch.sh](https://github.com/apache/beam/blob/master/release/src/main/scripts/cut_release_branch.sh)
script.
This will all be accomplished by the [cut_release_branch](https://github.com/apache/beam/actions/workflows/cut_release_branch.yml)
workflow.

After cutting the branch, you should manually update `CHANGES.md` on `master` by adding a new section for the next release.

#### Use cut_release_branch.sh to cut a release branch
* **Script:** [cut_release_branch.sh](https://github.com/apache/beam/blob/master/release/src/main/scripts/cut_release_branch.sh)

* **Usage**

`RELEASE_VERSION` and `NEXT_VERSION` should be formatted like `{major}.{minor}.{patch}` (e.g. `2.46.0`)

```
# Cut a release branch
./beam/release/src/main/scripts/cut_release_branch.sh \
--release=${RELEASE_VERSION} \
--next_release=${NEXT_VERSION}
# Show help page
./beam/release/src/main/scripts/cut_release_branch.sh -h
```
* **Action:** [cut_release_branch](https://github.com/apache/beam/actions/workflows/cut_release_branch.yml) (click `run workflow`)

### Start a snapshot build

Expand Down

0 comments on commit f770c9b

Please sign in to comment.