diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..4b523de --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,17 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - tuentisre + categories: + - title: Breaking Changes 🛠 + labels: + - breaking-change + - title: New Features 🎉 + labels: + - enhancement + - new-feature + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 8d51fd1..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "Publish library" -on: - workflow_dispatch: - inputs: - libraryVersion: - description: "Library version" - required: true - releaseDescription: - description: "Release description" - required: true -env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - run: 'echo -n ${{ github.event.inputs.libraryVersion }} > version.txt' - shell: bash - - - name: Increase version - uses: ./.github/actions/commit_and_push - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - files: '.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # TODO Pending publication steps - - name: Build Library - run: 'bash ./gradlew clean check assemble' - - - name: Create Release in github - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.event.inputs.libraryVersion }} - release_name: ${{ github.event.inputs.libraryVersion }} - body: ${{ github.event.inputs.releaseDescription }} - draft: true - prerelease: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..232f124 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: "Create release" +on: + release: + types: [published] +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Build library + run: 'bash ./gradlew clean :library:assembleRelease' + + - name: Release library + env: + MOBILE_MAVENCENTRAL_USER: ${{ secrets.MOBILE_MAVENCENTRAL_USER }} + MOBILE_MAVENCENTRAL_PASSWORD: ${{ secrets.MOBILE_MAVENCENTRAL_PASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} + ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }} + run: "bash ./gradlew publishReleasePublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} publishNoopPublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} + --max-workers 1 closeAndReleaseStagingRepository" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaefbb8..7677452 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,10 +7,13 @@ jobs: tests: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: "Lint & Detekt" - uses: vgaidarji/android-github-actions-build@v1.0.1 - with: - args: 'bash ./gradlew detekt check' + - name: Checkout + uses: actions/checkout@v3 + + - name: Run checks + if: success() || failure() + run: ./gradlew check + + - name: Run Detekt + if: success() || failure() + run: ./gradlew detekt diff --git a/app/src/main/java/com/telefonica/androidlogger/app/MainActivity.kt b/app/src/main/java/com/telefonica/androidlogger/app/MainActivity.kt index b3784ce..63aaa4f 100644 --- a/app/src/main/java/com/telefonica/androidlogger/app/MainActivity.kt +++ b/app/src/main/java/com/telefonica/androidlogger/app/MainActivity.kt @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { private fun setupViews() { findViewById