Skip to content

Commit

Permalink
Fix the deployment CI that uploads the jar to the GitHub release [2] (#…
Browse files Browse the repository at this point in the history
…453)

### What

Fix the deployment CI that uploads the jar to the GitHub release by updating the software being used from https://github.com/tcnksm/ghr to https://github.com/github-release/github-release.

### Why

Close #449.

In an attempt to fix the deploy job, that's failing at:
https://github.com/stellar/java-stellar-sdk/blob/417a84bd760321dba1ded0db0b9a32455737424f/.circleci/config.yml#L20-L29

With the error message:
```text
Failed to upload one of assets: one of the goroutines failed: failed to upload asset: /root/project/build/libs/stellar-sdk.jar: failed to upload release asset: /root/project/build/libs/stellar-sdk.jar: Post https://uploads.github.com/repos/stellar/java-stellar-sdk/releases/73913299/assets?name=stellar-sdk.jar: http2: Transport: cannot retry err [stream error: stream ID 5; REFUSED_STREAM] after Request.Body was written; define Request.GetBody to avoid this error
```

Example of a failed deploy: [deploy (678)](https://app.circleci.com/pipelines/github/stellar/java-stellar-sdk/545/workflows/85aac5f6-5744-4716-83cd-5e0ee60032ce/jobs/678)

There was already an attempt to solve this in #452 without success.
  • Loading branch information
marcelosalloum authored Aug 11, 2022
1 parent 417a84b commit 3255ceb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ jobs:
- libs/stellar-sdk.jar
deploy:
docker:
- image: cibuilds/github:0.13
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./build
- run:
name: "Publish Release on GitHub"
name: "Install github.com/github-release/github-release v0.10.0"
command: |
ghr -replace -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} ./build/libs
go get github.com/github-release/github-release@v0.10.0
- run:
name: "Upload JAR to GitHub Release"
command: |
github-release upload -s ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -t ${CIRCLE_TAG} -f ./build/libs/stellar-sdk.jar -n java-stellar-sdk.jar
after_deploy:
docker:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ As this project is pre 1.0, breaking changes may happen for minor version bumps.

## Pending

## 0.37.2

* Fix the deployment CI that uploads the jar to the GitHub release [2]. ([#453](https://github.com/stellar/java-stellar-sdk/pull/453))

## 0.37.1

* Fix the deployment CI that uploads the jar to the GitHub release. ([#452](https://github.com/stellar/java-stellar-sdk/pull/452))
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

sourceCompatibility = JavaVersion.VERSION_1_8.toString()
version = '0.37.1'
version = '0.37.2'
group = 'stellar'
jar.enabled = false

Expand Down

0 comments on commit 3255ceb

Please sign in to comment.