From d448360509837e195f79f976f17d9fcbd30069b0 Mon Sep 17 00:00:00 2001 From: danielefongo Date: Fri, 14 Feb 2020 14:59:53 +0100 Subject: [PATCH] add github pipeline --- .github/workflows/continuous_integration.yml | 9 +++++++ .github/workflows/publish_on_jitpack.yml | 28 ++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/continuous_integration.yml create mode 100644 .github/workflows/publish_on_jitpack.yml diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml new file mode 100644 index 0000000..6dea8b9 --- /dev/null +++ b/.github/workflows/continuous_integration.yml @@ -0,0 +1,9 @@ +name: Continuous Integration +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Test + run: ./gradlew clean test diff --git a/.github/workflows/publish_on_jitpack.yml b/.github/workflows/publish_on_jitpack.yml new file mode 100644 index 0000000..b83d397 --- /dev/null +++ b/.github/workflows/publish_on_jitpack.yml @@ -0,0 +1,28 @@ +name: Publish on JitPack +on: + push: + tags: + - '*' +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Test + run: ./gradlew clean test + - name: Create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + - name: Publish on JitPack + env: + GITHUB_REF: ${{ github.ref }} + run: | + echo "https://jitpack.io/api/builds/com.github.${{ github.repository }}/${GITHUB_REF##*/}" + curl "https://jitpack.io/api/builds/com.github.${{ github.repository }}/${GITHUB_REF##*/}"