From 44fabe0ef82fceab20197590dc3792105a45bd6b Mon Sep 17 00:00:00 2001 From: F4bioo Date: Mon, 17 Jun 2024 01:51:12 -0300 Subject: [PATCH 1/3] Changed: Manual trigger added for publication workflow --- .github/workflows/publish-library.yml | 35 ++++++++++++++++++++++++--- .github/workflows/release-build.yml | 3 +++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-library.yml b/.github/workflows/publish-library.yml index 280fa37..87365e5 100644 --- a/.github/workflows/publish-library.yml +++ b/.github/workflows/publish-library.yml @@ -1,16 +1,43 @@ name: Publish Library on: - push: - tags: - - 'v*.*.*' + workflow_dispatch: jobs: - publish: + check_environment: + name: Check Environment + runs-on: ubuntu-latest + steps: + - name: Check if Running on develop + run: | + if [[ "${{ github.ref }}" != "refs/heads/master" ]]; then + echo "This workflow can only be run on the master branch. Exiting." + exit 1 + fi + + - name: Check Authorized User + run: | + if [[ "${{ github.actor }}" != "F4bioo" ]]; then + echo "Unauthorized user. Exiting." + exit 1 + fi + + + maven-publish: + needs: check_environment + name: Maven Publish runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: master + token: ${{ secrets.MY_GH_TOKEN }} + + - name: Pull Latest Changes From master + run: | + git pull --rebase origin master - name: Cache Gradle dependencies uses: actions/cache@v2 diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 4d0bece..7e8ec1a 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -175,6 +175,9 @@ jobs: mv lib-build-artifacts.zip ../lib-build-artifacts shell: bash + - name: List LIB Build Artifacts Folder + run: ls -l lib-build-artifacts + - name: Upload LIB Build Artifacts uses: actions/upload-artifact@v3 with: From 2ea03a2a7f5c4700ea0ea208d600ddc7cd064d8e Mon Sep 17 00:00:00 2001 From: F4bioo Date: Mon, 17 Jun 2024 01:57:56 -0300 Subject: [PATCH 2/3] Changed: Update workflow for publish tests --- .github/workflows/release-build.yml | 2 +- buildSrc/src/main/java/Config.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 7e8ec1a..31a392c 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -286,7 +286,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: lib-build-artifacts/lib-build-artifacts.zip - asset_name: tourtip-v${{ env.RELEASE_TAG }}.zip + asset_name: tourtip-library-v${{ env.RELEASE_TAG }}-artifacts.zip asset_content_type: application/zip - name: Delete Release Artifacts diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index f5368fc..1d1d997 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -7,7 +7,7 @@ object Config { const val MIN_SDK: Int = 21 const val TARGET_SDK: Int = 34 // Do not bump manually, it's managed by CI - const val versionCode: Int = 1 + const val versionCode: Int = 0 // Do not bump manually, it's managed by CI const val versionName: String = "1.06" From 75825bc16c3f6511050274231dfc9f963cb4e079 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 17 Jun 2024 04:58:55 +0000 Subject: [PATCH 3/3] Changed: Bump app version v1.06 build 1 --- buildSrc/src/main/java/Config.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 1d1d997..f5368fc 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -7,7 +7,7 @@ object Config { const val MIN_SDK: Int = 21 const val TARGET_SDK: Int = 34 // Do not bump manually, it's managed by CI - const val versionCode: Int = 0 + const val versionCode: Int = 1 // Do not bump manually, it's managed by CI const val versionName: String = "1.06"