From 03deda49b11dd0731f5ca934cc2806c885986f69 Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 05:57:37 +0200 Subject: [PATCH 1/8] add CI --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6a7e0e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI +on: + workflow_dispatch: + push: + branches: [ main ] +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '17' + cache: 'maven' + - name: Build and Test + run: mvn -B package --file pom.xml + package-release: + needs: build-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Package + run: mvn -B package --file pom.xml + - name: Determine Release Name + run: "echo '::set-output name=name::build-'$(date +%Y-%m-%d-%H%M)" #$(date +%Y%m%d-%H%M%S) #$(git rev-parse HEAD | cut -c 1-8) #LATEST #$(basename "${{ github.ref }}") + id: release-name \ No newline at end of file From fbe2e8c0140e7431cdc25cbb3e5e52f68e5c7838 Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:02:20 +0200 Subject: [PATCH 2/8] fixes lombok version for CI build --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 874e25a..5d89a92 100644 --- a/pom.xml +++ b/pom.xml @@ -31,8 +31,7 @@ org.projectlombok lombok - 1.18.10 - provided + 1.18.22 From 5ab5f4fdfa69f9965bef6dd22ccc5860b5697337 Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:04:40 +0200 Subject: [PATCH 3/8] add CI --- .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 6a7e0e7..e7abb08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '17' + java-version: '8' cache: 'maven' - name: Build and Test run: mvn -B package --file pom.xml From 95f7a6cdd48cd8bcc722b0fcedb324951b1b186d Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:17:32 +0200 Subject: [PATCH 4/8] public artefact with CI --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7abb08..8ea086d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,24 +4,37 @@ on: push: branches: [ main ] jobs: - build-test: + build-test-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: - distribution: 'adopt' - java-version: '8' - cache: 'maven' - - name: Build and Test - run: mvn -B package --file pom.xml - package-release: - needs: build-test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Package - run: mvn -B package --file pom.xml - - name: Determine Release Name - run: "echo '::set-output name=name::build-'$(date +%Y-%m-%d-%H%M)" #$(date +%Y%m%d-%H%M%S) #$(git rev-parse HEAD | cut -c 1-8) #LATEST #$(basename "${{ github.ref }}") - id: release-name \ No newline at end of file + distribution: adopt + java-version: 8 + cache: maven + - run: mvn -B package --file pom.xml + - run: "echo '::set-output name=name::build-'$(date +%Y-%m-%d-%H%M)" #$(date +%Y%m%d-%H%M%S) #$(git rev-parse HEAD | cut -c 1-8) #LATEST #$(basename "${{ github.ref }}") + id: release-name + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.release-name.outputs.name }} + release_name: ${{ steps.release-name.outputs.name }} + draft: true + prerelease: false + - uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/scala-2.13/traviona-cloud-assembly-0.1.2.jar + asset_name: traviona-cloud-${{ steps.release-name.outputs.name }}.jar + asset_content_type: application/zip + - uses: eregon/publish-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} \ No newline at end of file From 07c658139f6a69d70a5baf99cddf5553a2ddb302 Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:19:49 +0200 Subject: [PATCH 5/8] public artefact with CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ea086d..fb59dbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: workflow_dispatch: push: - branches: [ main ] + branches: [ master ] jobs: build-test-release: runs-on: ubuntu-latest @@ -30,7 +30,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./target/scala-2.13/traviona-cloud-assembly-0.1.2.jar + asset_path: ./target/coingecko-java-1.0-SNAPSHOT.jar asset_name: traviona-cloud-${{ steps.release-name.outputs.name }}.jar asset_content_type: application/zip - uses: eregon/publish-release@v1 From bbb84a9b64312b0a6c6e2101f7b67b397480bb4a Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:21:12 +0200 Subject: [PATCH 6/8] public artefact with CI --- .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 fb59dbb..7bd4125 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./target/coingecko-java-1.0-SNAPSHOT.jar - asset_name: traviona-cloud-${{ steps.release-name.outputs.name }}.jar + asset_name: coingecko-java-${{ steps.release-name.outputs.name }}.jar asset_content_type: application/zip - uses: eregon/publish-release@v1 env: From 0b439ba80a6f93a9f28602bcfc4f99acc015c051 Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:25:00 +0200 Subject: [PATCH 7/8] public artefact with CI --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 5d89a92..faf2789 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,7 @@ org.projectlombok lombok + provided 1.18.22 From 91df0324d72d2ce2cf204e3498e7f4464b9a3c8d Mon Sep 17 00:00:00 2001 From: meckesl Date: Sat, 2 Apr 2022 06:30:02 +0200 Subject: [PATCH 8/8] CI add maven tests --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bd4125..8affe01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: distribution: adopt java-version: 8 cache: maven + - run: mvn test - run: mvn -B package --file pom.xml - run: "echo '::set-output name=name::build-'$(date +%Y-%m-%d-%H%M)" #$(date +%Y%m%d-%H%M%S) #$(git rev-parse HEAD | cut -c 1-8) #LATEST #$(basename "${{ github.ref }}") id: release-name