Skip to content

Commit 5abc0fd

Browse files
Merge pull request #128 from fireblocks/fireblocks-api-spec/generated/3733
Generated SDK #3733 (major)
2 parents 81b8fdc + c9c66ac commit 5abc0fd

File tree

108 files changed

+8999
-759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+8999
-759
lines changed

.auto-changelog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"output": "CHANGELOG.md",
3+
"template": "keepachangelog",
4+
"unreleased": false,
5+
"commitLimit": 0,
6+
"backfillLimit": 3,
7+
"hideCredit": true,
8+
"replaceText": {
9+
"\\[([^\\]]+)\\]\\(https://github.com/[^/]+/([^/]+)/compare/[^)]+\\)": "[$1](https://github.com/fireblocks/$2/releases/tag/$1)"
10+
}
11+
}

.github/release-drafter.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Draft Release from PR
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
pull-requests: read
11+
12+
jobs:
13+
draft-release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Get last merged PR
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: |
24+
gh pr list \
25+
--state merged \
26+
--base master \
27+
--limit 1 \
28+
--json number,title,body,labels \
29+
> pr.json
30+
31+
PR_NUM=$(jq -r '.[0].number // "none"' pr.json)
32+
PR_TITLE=$(jq -r '.[0].title // "none"' pr.json)
33+
echo "Found merged PR: #$PR_NUM - $PR_TITLE"
34+
35+
- name: Get latest release version
36+
env:
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
run: |
39+
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
40+
41+
if [[ -z "$LAST_TAG" || "$LAST_TAG" == "null" ]]; then
42+
echo "No existing release found. A release tag is required to calculate the next version."
43+
exit 1
44+
fi
45+
46+
echo "Found latest release: $LAST_TAG"
47+
echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV
48+
49+
- name: Calculate next version from labels
50+
run: |
51+
V="${LAST_TAG#v}"
52+
53+
MAJOR=$(echo $V | cut -d. -f1)
54+
MINOR=$(echo $V | cut -d. -f2)
55+
PATCH=$(echo $V | cut -d. -f3)
56+
57+
LABELS=$(jq -r '.[0].labels[].name' pr.json)
58+
echo "Found labels: $LABELS"
59+
60+
if echo "$LABELS" | grep -q "major"; then
61+
echo "Bumping MAJOR version"
62+
MAJOR=$((MAJOR+1))
63+
MINOR=0
64+
PATCH=0
65+
elif echo "$LABELS" | grep -q "minor"; then
66+
echo "Bumping MINOR version"
67+
MINOR=$((MINOR+1))
68+
PATCH=0
69+
else
70+
echo "Bumping PATCH version"
71+
PATCH=$((PATCH+1))
72+
fi
73+
74+
echo "Calculated next version: v$MAJOR.$MINOR.$PATCH"
75+
echo "VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV
76+
77+
- name: Create DRAFT release using PR BODY
78+
env:
79+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
run: |
81+
PR_BODY=$(jq -r '.[0].body // ""' pr.json)
82+
83+
echo "Creating draft release..."
84+
echo "Version: $VERSION"
85+
86+
gh release create "$VERSION" \
87+
--draft \
88+
--title "$VERSION" \
89+
--notes "$PR_BODY"
90+
91+
echo "Draft release created successfully!"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PR Auto Label
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: read
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Label PR by title
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
TITLE: ${{ github.event.pull_request.title }}
19+
PR: ${{ github.event.pull_request.number }}
20+
REPO: ${{ github.repository }}
21+
run: |
22+
label=""
23+
24+
if [[ "$TITLE" =~ \(major\) ]]; then
25+
label="major"
26+
elif [[ "$TITLE" =~ \(minor\) ]]; then
27+
label="minor"
28+
elif [[ "$TITLE" =~ \(patch\) ]]; then
29+
label="patch"
30+
fi
31+
32+
if [[ -n "$label" ]]; then
33+
echo "Found label: $label"
34+
gh pr edit "$PR" --repo "$REPO" --add-label "$label"
35+
else
36+
echo "No label found in title: $TITLE"
37+
fi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR Title Validation
2+
on:
3+
pull_request:
4+
types: [opened, edited, synchronize, reopened]
5+
jobs:
6+
validate:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: deepakputhraya/action-pr-title@master
10+
with:
11+
disallowed_prefixes: 'COR-'
12+
prefix_case_sensitive: false

.github/workflows/publish-maven.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
echo "finished configuration"
4343
bump-my-version bump --config-file .bump_version.toml --current-version 0.0.0 --new-version $tag
4444
echo "bumpversion finished"
45+
auto-changelog
4546
git add .
4647
git commit -m "release $tag"
4748
git push

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)