diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index 442bbcf9..9a418ee4 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -1,6 +1,9 @@ name: build-on-push -on: [ push, pull_request ] +on: + push: + branches-ignore: + - main jobs: build-on-push: diff --git a/.github/workflows/build-release-on-main-push.yml b/.github/workflows/build-release-on-main-push.yml index 09382c69..cd967bdd 100644 --- a/.github/workflows/build-release-on-main-push.yml +++ b/.github/workflows/build-release-on-main-push.yml @@ -7,6 +7,7 @@ on: jobs: build-release-on-main-push: + if: ${{ !contains(github.event.head_commit.message, '[release]') }} # prevent recursive releases runs-on: ubuntu-latest permissions: @@ -18,7 +19,7 @@ jobs: uses: actions/checkout@v4 with: ref: main - token: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}} + token: ${{secrets.PAT_GH_CI}} - name: setup-jdk uses: actions/setup-java@v4 @@ -32,6 +33,9 @@ jobs: gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: maven-build-verify + run: mvn --batch-mode verify + - uses: qoomon/actions--setup-git@v1 with: user: actor diff --git a/.github/workflows/dependabot-pr-auto-merge.yml b/.github/workflows/dependabot-pr-auto-merge.yml index dd40f8e8..b6bc2876 100644 --- a/.github/workflows/dependabot-pr-auto-merge.yml +++ b/.github/workflows/dependabot-pr-auto-merge.yml @@ -19,10 +19,10 @@ jobs: run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}} + GH_TOKEN: ${{secrets.PAT_GH_CI}} - name: dependabot-pr-auto-merge run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}} \ No newline at end of file + GH_TOKEN: ${{secrets.PAT_GH_CI}} \ No newline at end of file diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml index a06a6e93..bc89d995 100644 --- a/.github/workflows/release-from-tag.yml +++ b/.github/workflows/release-from-tag.yml @@ -9,9 +9,10 @@ jobs: release-notes-from-tag: runs-on: ubuntu-latest steps: - - name: Checkout + - name: checkout uses: actions/checkout@v4 - - name: Release + + - name: create-release-notes uses: softprops/action-gh-release@v2 with: generate_release_notes: true \ No newline at end of file diff --git a/src/main/java/net/osslabz/crypto/OhlcAsset.java b/src/main/java/net/osslabz/crypto/OhlcAsset.java index 51f3ae72..76e88bab 100644 --- a/src/main/java/net/osslabz/crypto/OhlcAsset.java +++ b/src/main/java/net/osslabz/crypto/OhlcAsset.java @@ -11,6 +11,10 @@ public record OhlcAsset(TradingAsset tradingAsset, Interval interval) { Objects.requireNonNull(interval, "interval cannot be null"); } + public OhlcAsset(Exchange exchange, CurrencyPair currencyPair, Interval interval) { + this(new TradingAsset(exchange, currencyPair), interval); + } + public OhlcAsset(Exchange exchange, String baseCurrencyCode, String counterCurrencyCode, Interval interval) { this(new TradingAsset(exchange, new CurrencyPair(baseCurrencyCode, counterCurrencyCode)), interval); }