-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #539 from stellar/release/3.5.0
Release `3.5.0` to `main`
- Loading branch information
Showing
33 changed files
with
824 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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,120 @@ | ||
name: Automated Release Process | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Release version (x.y.z or x.y.z-rc.1)" | ||
required: true | ||
type: string | ||
|
||
env: | ||
REPO_ORG: stellar | ||
REPO_NAME: stellar-disbursement-platform-backend | ||
REVIEWER: marcelosalloum,marwen-abid | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Validate version format | ||
run: | | ||
if ! [[ ${{ inputs.version }} =~ ^[0-9]+\.[0-9]+\.[0-9]+(-(rc|alpha|beta)\.[0-9]+)?$ ]]; then | ||
echo "Error: Version must be in format x.y.z or x.y.z-rc.n" | ||
echo "Examples:" | ||
echo " 1.2.3" | ||
echo " 1.2.3-rc.1" | ||
exit 1 | ||
fi | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup GitHub CLI | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
- name: Create release/${{ inputs.version }} branch | ||
run: | | ||
git checkout -b release/${{ inputs.version }} origin/${{ github.ref_name }} | ||
sed -i 's/const Version = ".*"/const Version = "${{ inputs.version }}"/' main.go | ||
git add main.go | ||
git commit -m "chore: bump version to ${{ inputs.version }}" | ||
git push origin release/${{ inputs.version }} | ||
- name: Create main PR | ||
id: create_main_pr | ||
run: | | ||
MAIN_PR_URL=$(sed "s/{{version}}/${{ inputs.version }}/g" .github/workflows/templates/release-pr-main.md | \ | ||
gh pr create --repo ${{ env.REPO_ORG }}/${{ env.REPO_NAME }} \ | ||
--base main \ | ||
--head release/${{ inputs.version }} \ | ||
--title "Release \`${{ inputs.version }}\` to \`main\`" \ | ||
--body-file - \ | ||
--assignee "${{ github.actor }}" \ | ||
--reviewer "${{ env.REVIEWER }}") | ||
echo "main_pr_url=${MAIN_PR_URL}" >> $GITHUB_OUTPUT | ||
- name: Create release/${{ inputs.version }}-dev branch | ||
run: | | ||
git checkout -b release/${{ inputs.version }}-dev release/${{ inputs.version }} | ||
git push origin release/${{ inputs.version }}-dev | ||
- name: Create develop PR | ||
id: create_dev_pr | ||
run: | | ||
DEV_PR_URL=$(sed -e "s/{{version}}/${{ inputs.version }}/g" \ | ||
-e "s|{{ main_pr_url }}|${{ steps.create_main_pr.outputs.main_pr_url }}|g" \ | ||
.github/workflows/templates/release-pr-dev.md | \ | ||
gh pr create --repo ${{ env.REPO_ORG }}/${{ env.REPO_NAME }} \ | ||
--base develop \ | ||
--head release/${{ inputs.version }}-dev \ | ||
--title "Release \`${{ inputs.version }}\` to \`dev\`" \ | ||
--body-file - \ | ||
--assignee "${{ github.actor }}" \ | ||
--reviewer "${{ env.REVIEWER }}") | ||
echo "dev_pr_url=${DEV_PR_URL}" >> $GITHUB_OUTPUT | ||
- name: Create Draft Release | ||
id: create_release | ||
run: | | ||
RELEASE_URL=$(gh release create ${{ inputs.version }} \ | ||
--title "${{ inputs.version }}" \ | ||
--draft \ | ||
--notes "Initial draft for release \`${{ inputs.version }}\`") | ||
echo "release_url=${RELEASE_URL}" >> $GITHUB_OUTPUT | ||
- name: Create Issue | ||
id: create_issue | ||
run: | | ||
ISSUE_URL=$(sed -e "s/{{version}}/${{ inputs.version }}/g" \ | ||
-e "s|{{ main_pr_url }}|${{ steps.create_main_pr.outputs.main_pr_url }}|g" \ | ||
-e "s|{{ dev_pr_url }}|${{ steps.create_dev_pr.outputs.dev_pr_url }}|g" \ | ||
-e "s|{{ release_url }}|${{ steps.create_release.outputs.release_url }}|g" \ | ||
.github/workflows/templates/release-issue.md | \ | ||
gh issue create \ | ||
--title "Release \`${{ inputs.version }}\`" \ | ||
--body-file - \ | ||
--label "release" \ | ||
--assignee "${{ github.actor }}") | ||
echo "issue_url=${ISSUE_URL}" >> $GITHUB_OUTPUT | ||
- name: Print Summary | ||
run: | | ||
echo "Release Process Summary for ${{ inputs.version }}" | ||
echo "----------------------------------------" | ||
echo "Issue: ${{ steps.create_issue.outputs.issue_url }}" | ||
echo "Main PR: ${{ steps.create_main_pr.outputs.main_pr_url }}" | ||
echo "Dev PR: ${{ steps.create_dev_pr.outputs.dev_pr_url }}" | ||
echo "Draft Release: ${{ steps.create_release.outputs.release_url }}" |
This file contains 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,23 @@ | ||
Release `{{version}}` | ||
|
||
## Release Checklist | ||
|
||
### Git Preparation | ||
|
||
- [x] Create release branch `release/{{version}}` from `develop` | ||
- [x] Create pull requests: | ||
- Main PR: {{ main_pr_url }} | ||
- Dev PR: {{ dev_pr_url }} | ||
|
||
### Code Preparation | ||
|
||
- [ ] Run tests and linting | ||
- [ ] Complete the checklist and merge the main PR: {{ main_pr_url }} | ||
- [ ] Complete the checklist and merge the dev PR: {{ dev_pr_url }} | ||
- [ ] 🚨 DO NOT RELEASE before holidays or weekends! Mondays and Tuesdays are preferred. | ||
|
||
### Publishing the Release | ||
|
||
- [ ] After the main PR is merged, publish the draft release: {{ release_url }} -> [Release Page](https://github.com/stellar/stellar-disbursement-platform-backend/releases/tag/{{version}}) | ||
- [ ] Verify the Docker image is published to [Docker Hub](https://hub.docker.com/r/stellar/stellar-disbursement-platform-backend/tags) | ||
- [ ] Propagate the helmchart version update to the [stellar/helm-charts](https://github.com/stellar/helm-charts) repository |
This file contains 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,7 @@ | ||
Release `{{version}}` to `dev` | ||
|
||
### Pending | ||
|
||
- [ ] Merge the main PR {{ main_pr_url }} | ||
- [ ] Rebase this branch onto `main` | ||
- [ ] 🚨 Merge this PR using the **`Merge pull request`** button |
This file contains 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,11 @@ | ||
Release `{{version}}` to `main` | ||
|
||
### Pending | ||
|
||
- [x] Bump version in main.go | ||
- [ ] Update CHANGELOG.md | ||
- [ ] Bump version in helmchart/sdp/Chart.yaml | ||
- [ ] Bump backend version in helmchart/sdp/values.yaml | ||
- [ ] Bump frontend version in helmchart/sdp/values.yaml | ||
- [ ] Regenerate the helm charts README.md with `readme-generator -v values.yaml -r README.md` | ||
- [ ] 🚨 Merge this PR using the **`Merge pull request`** button |
This file contains 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
20 changes: 20 additions & 0 deletions
20
db/migrations/sdp-migrations/2025-01-30.0-add-short-urls-table.sql
This file contains 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,20 @@ | ||
-- Add auditing to receiver_verifications | ||
|
||
-- +migrate Up | ||
CREATE TABLE short_urls ( | ||
id VARCHAR(10) PRIMARY KEY, | ||
original_url TEXT NOT NULL, | ||
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() | ||
); | ||
|
||
CREATE UNIQUE INDEX short_urls_original_url_idx ON short_urls (original_url); | ||
|
||
ALTER TABLE organizations | ||
ADD COLUMN is_link_shortener_enabled boolean NOT NULL DEFAULT false; | ||
|
||
|
||
-- +migrate Down | ||
DROP TABLE short_urls; | ||
|
||
ALTER TABLE organizations | ||
DROP COLUMN is_link_shortener_enabled; |
This file contains 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 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 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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
Oops, something went wrong.