From 11e689a6480829c33d8aac29add86fdeef930f87 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 9 Sep 2024 17:12:05 +0300 Subject: [PATCH] Add release workflow --- .github/workflows/gradle.yml | 11 ----------- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 99d5e058..b58ea739 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -211,17 +211,6 @@ jobs: files: webrtc-android-framework/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml,webrtc-android-sample-app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml fail_ci_if_error: true - - name: Deploy to Sonatype - #deploy only in master branches - if: github.ref == 'refs/heads/master' - run: ./gradlew publish - env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} - SIGNING_KEY: ${{ secrets.SIGNING_KEY }} - clean: needs: [setup-runner, unit-tests] runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..78e37fc2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Create Release on Tag + +on: + push: + tags: + - '*' + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + permissions: write-all + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Deploy to Sonatype + run: ./gradlew publish + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} \ No newline at end of file