From cbe7fb2c763987dde67a0fe75621739ded4c4374 Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Sat, 23 Sep 2023 18:54:45 +0200 Subject: [PATCH 1/5] ci: rename workflow --- .github/workflows/{maven.yml => ci.yml} | 0 README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{maven.yml => ci.yml} (100%) diff --git a/.github/workflows/maven.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/maven.yml rename to .github/workflows/ci.yml diff --git a/README.md b/README.md index ae7a93b40..86372b324 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | You **cannot** use this library for Android app development. Have a look at [adamint/spotify-web-api-kotlin](https://www.github.com/adamint/spotify-web-api-kotlin), [kaaes/spotify-web-api-android](https://www.github.com/kaaes/spotify-web-api-android) and [Spotify's Android SDK](https://developer.spotify.com/technologies/spotify-android-sdk/) and [see why](https://github.com/thelinmichael/spotify-web-api-java/issues/120#issuecomment-363266591). | # Spotify Web API Java -[![CI](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/maven.yml/badge.svg)](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/maven.yml) [![codecov](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java/branch/develop/graph/badge.svg)](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java) +[![CI](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/ci.yml/badge.svg)](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java/branch/develop/graph/badge.svg)](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java) This is a Java wrapper/client for the [Spotify Web API](https://developer.spotify.com/web-api/). From 26d3bd1f10d3ccb1ebaa343d4f0037898a55d038 Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Sat, 23 Sep 2023 18:55:34 +0200 Subject: [PATCH 2/5] ci: use java 21 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8f96f559..56155576e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '11', '17' ] + java: [ '11', '21' ] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - name: Set up JDK 11 From 84411cea35119efc6d9f6bc47a97ba0c3f2cfdfc Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Sat, 23 Sep 2023 19:30:04 +0200 Subject: [PATCH 3/5] ci: only run once for pull requests --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56155576e..40e0ea8f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,21 @@ name: CI on: [create, pull_request, push] jobs: + prepare_jobs: + name: 'Prepare: job optimization' + runs-on: ubuntu-latest + outputs: + pr_found: ${{ steps.pr.outputs.pr_found }} + steps: + - name: Get current PR + id: pr + uses: 8BitJonny/gh-get-current-pr@2.2.0 + with: + filterOutClosed: true + sha: ${{ github.event.pull_request.head.sha }} build: + needs: prepare_jobs + if: needs.prepare_jobs.outputs.pr_found == 'false' || github.event_name == 'pull_request' runs-on: ubuntu-latest strategy: matrix: From b006a050dc69f8a52b5f94b8d4cdb58d7bc4e40e Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Sat, 23 Sep 2023 19:38:37 +0200 Subject: [PATCH 4/5] ci: do not run on `create` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40e0ea8f3..ab49b4cd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [create, pull_request, push] +on: [pull_request, push] jobs: prepare_jobs: From d3b3137fa2a23c9943954114f9a8334ce4b8362a Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Sat, 23 Sep 2023 18:55:34 +0200 Subject: [PATCH 5/5] Revert "ci: use java 21" This reverts commit 26d3bd1f10d3ccb1ebaa343d4f0037898a55d038. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab49b4cd5..55f286d3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '11', '21' ] + java: [ '11', '17' ] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - name: Set up JDK 11