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
31 changes: 24 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,23 @@ jobs:
VERSION: ${{ steps.version.outputs.version }}
run: |
git add src/BitPaySDK/Env.php phpdoc.dist.xml
git commit -m "Bump version to $VERSION"
git push origin "$BRANCH"
if git diff --cached --quiet; then
echo "No changes to commit - version already bumped"
else
git commit -m "Bump version to $VERSION"
git push origin "$BRANCH"
fi

- name: Create and push tag
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
git tag "$VERSION"
git push origin "$VERSION"
if git rev-parse "$VERSION" >/dev/null 2>&1; then
echo "Tag $VERSION already exists"
else
git tag "$VERSION"
git push origin "$VERSION"
fi

- name: Get merged PR titles and format release notes
id: changelog
Expand All @@ -86,13 +94,22 @@ jobs:
OVERVIEW: ${{ inputs.overview }}
BRANCH: ${{ inputs.branch }}
REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.version.outputs.version }}
run: |
git fetch --tags

# Get most recent and previous tags
# Get all tags sorted by creation date (newest first)
tags=($(git tag --sort=-creatordate))
new_tag="${tags[0]}"
prev_tag="${tags[1]}"

# Find the current version tag and get the previous one
new_tag="$VERSION"
prev_tag=""
for i in "${!tags[@]}"; do
if [[ "${tags[$i]}" == "$VERSION" ]]; then
prev_tag="${tags[$((i+1))]}"
break
fi
done

if [ -z "$prev_tag" ]; then
echo "Warning: No previous tag found. Skipping full changelog link."
Expand Down
76 changes: 38 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<output>docs</output>
</paths>

<version number="10.1.1">
<version number="10.1.2">
<api format="php">
<source dsn=".">
<path>src</path>
Expand Down
2 changes: 1 addition & 1 deletion src/BitPaySDK/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Env
public const TEST_URL = "https://test.bitpay.com/";
public const PROD_URL = "https://bitpay.com/";
public const BITPAY_API_VERSION = "2.0.0";
public const BITPAY_PLUGIN_INFO = "BitPay_PHP_Client_v10.1.1";
public const BITPAY_PLUGIN_INFO = "BitPay_PHP_Client_v10.1.2";
public const BITPAY_API_FRAME = "std";
public const BITPAY_API_FRAME_VERSION = "1.0.0";
public const BITPAY_DATETIME_FORMAT = 'Y-m-d\TH:i:s\Z';
Expand Down