From 45d80f0899aff03d64ded2ca0b73aa66366010ff Mon Sep 17 00:00:00 2001 From: Olivier Filangi Date: Wed, 21 Feb 2024 11:46:17 +0100 Subject: [PATCH] add github action --- .circleci/config.yml | 36 ----------------------------------- .github/workflows/ci.yml | 17 +++++++++++++++++ .github/workflows/release.yml | 22 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 905356c..e7b9e26 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -138,39 +138,3 @@ jobs: #- run: # name: Publish package # command: npm publish - - publish_snapshot: - executor: openjdk - steps: - - checkout - - setup_remote_docker - - restore_cache: - keys: - - v1-dependencies-{{ checksum "build.sbt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: Snapshot publication - command: | - export PROG_VERSION="${CIRCLE_BRANCH}-SNAPSHOT" - echo "Importing key" - echo -e "$GPG_KEY" | gpg --import - sbt publish - - publish_tag_to_sonatype_stagge_for_release: - executor: openjdk - steps: - - checkout - - setup_remote_docker - - restore_cache: - keys: - - v1-dependencies-{{ checksum "build.sbt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: Release publication - command: | - export PROG_VERSION="${CIRCLE_TAG}" - echo "Importing key" - echo -e "$GPG_KEY" | gpg --import - sbt publish diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4f2a3f4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI +on: + pull_request: + push: +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + - name: Build and Test + run: sbt -v +test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6940ca0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release +on: + push: + branches: [master, main] + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + cache: sbt + - run: sbt ci-release + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} \ No newline at end of file