Skip to content

Commit 7c47b8c

Browse files
committed
Merge branch 'release/2.2.0'
2 parents c42ad19 + 683b013 commit 7c47b8c

28 files changed

+918
-19
lines changed
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
name: Create Release PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
description: 'The release_version used for the release branch name, e.g. release/x.x.x'
8+
default: 'x.x.x'
9+
required: true
10+
type: string
11+
pre_release_version:
12+
description: "Pre-Release version, e.g. 'beta-1'"
13+
required: false
14+
type: string
15+
16+
env:
17+
RELEASE_VERSION: ${{ inputs.release_version }}
18+
PRE_RELEASE_VERSION: ${{ inputs.pre_release_version }}
19+
RELEASE_BRANCH: release/${{ inputs.release_version }}
20+
21+
jobs:
22+
create-release-pr:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Set Release Version and Branch to Check Out
27+
id: set-release
28+
run: |
29+
if [[ $RELEASE_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
30+
if [[ $PRE_RELEASE_VERSION =~ ^[-a-z0-9]+$ ]]; then
31+
echo "release-tag: $RELEASE_VERSION-$PRE_RELEASE_VERSION"
32+
echo "release-tag=$RELEASE_VERSION-$PRE_RELEASE_VERSION" >> $GITHUB_OUTPUT
33+
elif [[ -n $PRE_RELEASE_VERSION ]]; then
34+
echo "Input pre_release_version is not empty, but does not match the regex pattern ^[-a-z0-9]+$"
35+
exit 1
36+
else
37+
echo "release-tag: $RELEASE_VERSION"
38+
echo "release-tag=$RELEASE_VERSION" >> $GITHUB_OUTPUT
39+
fi
40+
else
41+
echo "Version input doesn't match the regex pattern ^[0-9]+\.[0-9]+\.[0-9]+$"
42+
exit 1
43+
fi
44+
45+
- name: Checkout
46+
uses: actions/checkout@v3
47+
with:
48+
fetch-depth: 0
49+
50+
- name: Create Release Branch if it does not exist
51+
run: |
52+
if ! git show-ref --verify --quiet "refs/remotes/origin/$RELEASE_BRANCH"; then
53+
git checkout -b $RELEASE_BRANCH
54+
git push --set-upstream origin $RELEASE_BRANCH
55+
elif [[ $(git rev-parse --abbrev-ref HEAD) != "$RELEASE_BRANCH" ]]; then
56+
echo "Current Branch: $(git rev-parse --abbrev-ref HEAD)"
57+
echo "Release branch exists, make sure you're using the workflow from the release branch or delete the existing release branch."
58+
exit 1
59+
else
60+
echo "Release branch exists and used as workflow ref."
61+
fi
62+
63+
- name: Get Latest Release
64+
id: get-release
65+
run: |
66+
if [[ -n $PRE_RELEASE_VERSION ]]; then
67+
echo "Get the latest release"
68+
tag=$(curl -L \
69+
--header "Accept: application/vnd.github.v3+json" \
70+
"https://api.github.com/repos/${{ github.repository }}/releases" | jq -r '.[0].tag_name')
71+
echo "latest-tag=$tag" >> $GITHUB_OUTPUT
72+
else
73+
echo "Get the latest stable release"
74+
tag=$(curl -L \
75+
--header "Accept: application/vnd.github.v3+json" \
76+
"https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name')
77+
echo "latest-tag=$tag" >> $GITHUB_OUTPUT
78+
fi
79+
80+
- name: Build Changelog
81+
uses: mikepenz/[email protected]
82+
id: build-changelog
83+
env:
84+
PREVIOUS_VERSION: ${{ steps.get-release.outputs.latest-tag }}
85+
with:
86+
fromTag: ${{ env.PREVIOUS_VERSION }}
87+
toTag: ${{ env.RELEASE_BRANCH }}
88+
failOnError: true
89+
configurationJson: |
90+
{
91+
"categories": [
92+
{
93+
"title": "## New Features",
94+
"labels": [
95+
"New Feature"
96+
]
97+
},
98+
{
99+
"title": "## Enhancements",
100+
"labels": [
101+
"Enhancement"
102+
]
103+
},
104+
{
105+
"title": "## Bug Fixes",
106+
"labels": [
107+
"Bug-Fix"
108+
]
109+
},
110+
{
111+
"title": "## Not Yet Enabled",
112+
"labels": [
113+
"Not-Yet-Enabled"
114+
]
115+
}
116+
],
117+
"ignore_labels": [
118+
"Skip-Release-Notes"
119+
],
120+
"sort": {
121+
"order": "ASC",
122+
"on_property": "mergedAt"
123+
},
124+
"template": "#{{CHANGELOG}}",
125+
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}"
126+
}
127+
128+
- name: Update Changelog
129+
if: ${{ env.PRE_RELEASE_VERSION == '' }}
130+
env:
131+
CHANGELOG_CONTENT: ${{ steps.build-changelog.outputs.changelog }}
132+
PREVIOUS_VERSION: ${{ steps.get-release.outputs.latest-tag }}
133+
run: |
134+
echo -e "# ${RELEASE_VERSION}\n\n${CHANGELOG_CONTENT}**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_VERSION}...${RELEASE_VERSION}\n" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md
135+
136+
- name: Update Version References in Source
137+
env:
138+
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }}
139+
run: |
140+
python3 scripts/bump_version.py ${RELEASE_TAG}
141+
142+
- name: Commit Changes
143+
uses: EndBug/[email protected]
144+
env:
145+
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }}
146+
with:
147+
message: "bump up version to ${{ env.RELEASE_TAG }}"
148+
149+
- name: Create Pull Request to Master
150+
env:
151+
CHANGELOG_CONTENT: ${{ steps.build-changelog.outputs.changelog }}
152+
PREVIOUS_VERSION: ${{ steps.get-release.outputs.latest-tag }}
153+
GH_TOKEN: ${{ github.token }}
154+
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }}
155+
run: |
156+
echo -e "# What's Changed\n\n${CHANGELOG_CONTENT}**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_VERSION}...${RELEASE_TAG}" > tmp_msg_body.txt
157+
export msg_body=$(cat tmp_msg_body.txt)
158+
rm tmp_msg_body.txt
159+
# Note: There's an issue adding teams as reviewers, see https://github.com/cli/cli/issues/6395
160+
PULL_REQUEST_URL=$(gh pr create --base "master" \
161+
--title "FOR REVIEW ONLY: ${{ github.event.repository.name }} $RELEASE_TAG" \
162+
--label "Skip-Release-Notes" \
163+
--label "Team Hyper Flow" \
164+
--body "$msg_body" | tail -n 1)
165+
if [[ $PULL_REQUEST_URL =~ ^https://github.com/${{ github.repository }}/pull/[0-9]+$ ]]; then
166+
PULL_REQUEST_NUM=$(echo $PULL_REQUEST_URL | sed 's:.*/::')
167+
echo "pull-request-master=$PULL_REQUEST_URL" >> $GITHUB_ENV
168+
echo "pull-request-master-num=$PULL_REQUEST_NUM" >> $GITHUB_ENV
169+
echo "Pull request to Master created: $PULL_REQUEST_URL"
170+
else
171+
echo "There was an issue creating the pull request to master branch."
172+
exit 1
173+
fi
174+
175+
- name: Create Pull Request to Develop
176+
if: ${{ env.PRE_RELEASE_VERSION == '' }}
177+
env:
178+
GH_TOKEN: ${{ github.token }}
179+
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }}
180+
run: |
181+
# Note: There's an issue adding teams as reviewers, see https://github.com/cli/cli/issues/6395
182+
PULL_REQUEST_URL=$(gh pr create --base "develop" \
183+
--title "FOR REVIEW ONLY: Merge back ${{ github.event.repository.name }} $RELEASE_TAG to develop" \
184+
--label "Skip-Release-Notes" \
185+
--label "Team Hyper Flow" \
186+
--body "Merge back version changes to develop." | tail -n 1)
187+
if [[ $PULL_REQUEST_URL =~ ^https://github.com/${{ github.repository }}/pull/[0-9]+$ ]]; then
188+
echo "Pull request to Develop created: $PULL_REQUEST_URL"
189+
DEVELOP_PR_MESSAGE="\nPull Request to develop: $PULL_REQUEST_URL"
190+
echo "pull-request-develop-message=$DEVELOP_PR_MESSAGE" >> $GITHUB_ENV
191+
else
192+
echo "There was an issue creating the pull request to develop branch."
193+
exit 1
194+
fi
195+
196+
- name: Send Slack Message
197+
id: slack
198+
uses: slackapi/[email protected]
199+
env:
200+
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }}
201+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
202+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
203+
SDK_DEPLOYMENT_URL: ${{ secrets.SDK_DEPLOYMENT_URL }}
204+
with:
205+
payload: |
206+
{
207+
"blocks": [
208+
{
209+
"type": "header",
210+
"text": {
211+
"type": "plain_text",
212+
"text": "${{ github.event.repository.name }} Release PR for ${{ env.RELEASE_TAG }}"
213+
}
214+
},
215+
{
216+
"type": "section",
217+
"text": {
218+
"type": "mrkdwn",
219+
"text": "*Approvals needed for*:\nPull Request to master: ${{ env.pull-request-master}}${{ env.pull-request-develop-message }}"
220+
}
221+
},
222+
{
223+
"type": "section",
224+
"text": {
225+
"type": "mrkdwn",
226+
"text": "*After approvals*\nDeploy SDK using the <${{ env.SDK_DEPLOYMENT_URL }}|Deployment Pipeline> with the following parameters:\n*SDK*: ${{ github.event.repository.name }}\n*RELEASE_PR_NUM*: ${{ env.pull-request-master-num }}\n*RELEASE_VERSION*: ${{ env.RELEASE_VERSION }}\n*PRE_RELEASE_VERSION*: ${{ env.PRE_RELEASE_VERSION }}"
227+
}
228+
}
229+
]
230+
}

.test-env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SDK_TESTING_HARNESS="test-harness"
55

66
INSTALL_ONLY=0
77

8-
VERBOSE_HARNESS=0
8+
VERBOSE_HARNESS=1
99

1010
# WARNING: If set to 1, new features will be LOST when downloading the test harness.
1111
# REGARDLESS: modified features are ALWAYS overwritten.

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 2.2.0
2+
3+
## Enhancements
4+
5+
- DevOps: Update CODEOWNERS to only refer to the devops group by @onetechnical in #571
6+
- deltas: Deltas apis by @Eric-Warehime in #575
7+
- algod: Regen changes for Deltas endpoints by @Eric-Warehime in #590
8+
9+
## Bug Fixes
10+
11+
- docs: remove old example from README by @winder in #561
12+
13+
**Full Changelog**: https://github.com/algorand/java-algorand-sdk/compare/2.1.0...2.2.0
14+
115
# 2.1.0
216

317
## What's Changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.github/ @algorand/dev
2-
.circleci/ @algorand/dev
1+
.github/ @algorand/devops
2+
.circleci/ @algorand/devops

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)