Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": 0,
"backfillLimit": 3,
"hideCredit": true,
"replaceText": {
"\\[([^\\]]+)\\]\\(https://github.com/[^/]+/[^/]+/compare/[^)]+\\)": "[$1](https://github.com/fireblocks/ts-sdk/releases/tag/$1)"
}
}
56 changes: 0 additions & 56 deletions .github/release-drafter.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/draft-release-from-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Draft Release from PR

on:
push:
branches:
- master_changelog_test

permissions:
contents: write
pull-requests: read

jobs:
draft-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get last merged PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list \
--state merged \
--base master_changelog_test \
--limit 1 \
--json number,title,body,labels \
> pr.json

PR_NUM=$(jq -r '.[0].number // "none"' pr.json)
PR_TITLE=$(jq -r '.[0].title // "none"' pr.json)
echo "Found merged PR: #$PR_NUM - $PR_TITLE"

- name: Get latest release version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')

if [[ -z "$LAST_TAG" || "$LAST_TAG" == "null" ]]; then
echo "No existing release found, starting from v0.1.0"
echo "LAST_TAG=v0.1.0" >> $GITHUB_ENV
else
echo "Found latest release: $LAST_TAG"
echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV
fi

- name: Calculate next version from labels
run: |
V="${LAST_TAG#v}"

MAJOR=$(echo $V | cut -d. -f1)
MINOR=$(echo $V | cut -d. -f2)
PATCH=$(echo $V | cut -d. -f3)

LABELS=$(jq -r '.[0].labels[].name' pr.json)
echo "Found labels: $LABELS"

if echo "$LABELS" | grep -q "major"; then
echo "Bumping MAJOR version"
MAJOR=$((MAJOR+1))
MINOR=0
PATCH=0
elif echo "$LABELS" | grep -q "minor"; then
echo "Bumping MINOR version"
MINOR=$((MINOR+1))
PATCH=0
else
echo "Bumping PATCH version"
PATCH=$((PATCH+1))
fi

echo "Calculated next version: v$MAJOR.$MINOR.$PATCH"
echo "VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV

- name: Create DRAFT release using PR BODY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_BODY=$(jq -r '.[0].body // ""' pr.json)

echo "Creating draft release..."
echo "Version: $VERSION"

gh release create "$VERSION" \
--draft \
--title "$VERSION" \
--notes "$PR_BODY"

echo "Draft release created successfully!"
37 changes: 37 additions & 0 deletions .github/workflows/pr-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Auto Label

on:
pull_request:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR by title
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: ${{ github.event.pull_request.title }}
PR: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
label=""

if [[ "$TITLE" =~ \(major\) ]]; then
label="major"
elif [[ "$TITLE" =~ \(minor\) ]]; then
label="minor"
elif [[ "$TITLE" =~ \(patch\) ]]; then
label="patch"
fi

if [[ -n "$label" ]]; then
echo "Found label: $label"
gh pr edit "$PR" --repo "$REPO" --add-label "$label"
else
echo "No label found in title: $TITLE"
fi
12 changes: 12 additions & 0 deletions .github/workflows/pr-title-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR Title Validation
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-pr-title@master
with:
disallowed_prefixes: 'COR-'
prefix_case_sensitive: false
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.fireblocks.sdk</groupId>
<artifactId>fireblocks-sdk</artifactId>
<version>14.0.0</version>
<version>0.0.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -42,7 +42,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.fireblocks.sdk:fireblocks-sdk:14.0.0"
compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0"
```

### Others
Expand All @@ -55,7 +55,7 @@ mvn clean package

Then manually install the following JARs:

- `target/fireblocks-sdk-14.0.0.jar`
- `target/fireblocks-sdk-0.0.0.jar`
- `target/lib/*.jar`


Expand Down Expand Up @@ -485,6 +485,7 @@ Class | Method | HTTP request | Description
*WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID
*WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks
*WebhooksV2Api* | [**createWebhook**](docs/WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook
*WebhooksV2Api* | [**deleteNotification**](docs/WebhooksV2Api.md#deleteNotification) | **DELETE** /webhooks/{webhookId}/notifications/{notificationId} | Delete notification by id
*WebhooksV2Api* | [**deleteWebhook**](docs/WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook
*WebhooksV2Api* | [**getMetrics**](docs/WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics
*WebhooksV2Api* | [**getNotification**](docs/WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id
Expand Down
Loading
Loading