-
Notifications
You must be signed in to change notification settings - Fork 118
Create Release PR workflow #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3619862
Create Release workflow
lucacome 1dc4010
fix sed
lucacome 7bc5387
Add Plus
lucacome 702cd87
Merge branch 'main' into chore/create-release-workflow
lucacome 3215f6d
Update release doc
lucacome 3d867bd
revert to edge
lucacome 263c23d
Merge branch 'main' into chore/create-release-workflow
lucacome File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Release %%VERSION%% | ||
|
||
%%DATE%% | ||
|
||
FEATURES: | ||
|
||
- | ||
|
||
BUG FIXES: | ||
|
||
- | ||
|
||
DOCUMENTATION: | ||
|
||
- | ||
|
||
HELM CHART: | ||
|
||
- The version of the Helm chart is now %%VERSION%% | ||
- | ||
|
||
UPGRADE: | ||
|
||
- | ||
|
||
COMPATIBILITY: | ||
|
||
- The Gateway API version: `` | ||
- NGINX version: `` | ||
- Kubernetes version: `` | ||
|
||
CONTAINER IMAGES: | ||
|
||
- Control plane: `ghcr.io/nginxinc/nginx-gateway-fabric:%%VERSION%%` | ||
- Data plane: `ghcr.io/nginxinc/nginx-gateway-fabric/nginx:%%VERSION%%` | ||
- Data plane with NGINX Plus: `private-registry.nginx.com/nginx-gateway-fabric/nginx-plus:%%VERSION%%` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Release PR | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version to release" | ||
required: true | ||
default: "0.0.0" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Branch | ||
id: branch | ||
run: | | ||
version=${{ github.event.inputs.version }} | ||
version=${version%.*} | ||
echo "branch=release-$version" >> $GITHUB_OUTPUT | ||
sjberman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
ref: ${{ steps.branch.outputs.branch }} | ||
|
||
- name: Vars | ||
id: vars | ||
run: | | ||
# TODO(lucacome): improve this and maybe use appVersion instead of version if we switch to tags | ||
echo "current_version=$(yq '.version' <deploy/helm-chart/Chart.yaml)" >> $GITHUB_OUTPUT | ||
lucacome marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Find and Replace | ||
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2 | ||
with: | ||
find: ${{ steps.vars.outputs.current_version }} | ||
replace: ${{ inputs.version }} | ||
include: "site/content/**/*.md" | ||
regex: false | ||
|
||
- name: Find and Replace | ||
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2 | ||
with: | ||
find: "edge" | ||
replace: ${{ inputs.version }} | ||
include: "deploy/helm-chart/*.yaml" | ||
lucacome marked this conversation as resolved.
Show resolved
Hide resolved
|
||
regex: false | ||
|
||
- name: Find and Replace | ||
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2 | ||
with: | ||
find: "Always" | ||
replace: "IfNotPresent" | ||
include: "deploy/helm-chart/*.yaml" | ||
regex: false | ||
|
||
- name: Generate manifests and changelog | ||
run: | | ||
sed -i -e "s/v${{ steps.vars.outputs.current_version }}/v${{ inputs.version }}/g" README.md | ||
sed -i -e "s/VERSION = edge/VERSION = ${{ inputs.version }}/g" Makefile | ||
sed -i -e "s/VERSION = ${{ steps.vars.outputs.current_version }}/VERSION = ${{ inputs.version }}/g" conformance/Makefile | ||
sed -i -e "s/TAG = edge/TAG = ${{ inputs.version }}/g" **/Makefile | ||
sed -i "5r .github/CHANGELOG_TEMPLATE.md" CHANGELOG.md | ||
sjberman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
sed -i -e "s/%%VERSION%%/${{ inputs.version }}/g" CHANGELOG.md | ||
make generate-manifests | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 | ||
with: | ||
token: ${{ secrets.NGINX_PAT }} | ||
commit-message: Release ${{ inputs.version }} | ||
title: Release ${{ inputs.version }} | ||
branch: docs/release-${{ inputs.version }} | ||
author: nginx-bot <integrations@nginx.com> | ||
committer: nginx-bot <integrations@nginx.com> | ||
body: | | ||
This automated PR updates all the necessary files for ${{ inputs.version }} release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.