From e02c22f6f50e52acdb80c8a9fe296b59c89c922e Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:51:14 +0700 Subject: [PATCH 1/6] Test ci --- .github/workflows/release.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fa5f85..4a4f3dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,12 @@ name: Build & Release on: workflow_dispatch: - push: - tags: - - 'v*.*' +# push: +# tags: +# - 'v*.*' + pull_request: + branches: + - main jobs: build: @@ -28,6 +31,9 @@ jobs: - name: Set up Android SDK uses: android-actions/setup-android@v3 + - name: TEST + run: git describe --tags --abbrev=0 + - name: Build app run: ./gradlew assembleRelease @@ -56,10 +62,10 @@ jobs: excludeTypes: build,chore writeToFile: false - - name: Create release - uses: softprops/action-gh-release@v2 - with: - body: ${{ steps.changelog.outputs.changes }} - files: "app-release.apk" - fail_on_unmatched_files: true - make_latest: true +# - name: Create release +# uses: softprops/action-gh-release@v2 +# with: +# body: ${{ steps.changelog.outputs.changes }} +# files: "app-release.apk" +# fail_on_unmatched_files: true +# make_latest: true From c86798ff6eb25526e0b63a75924be9473f9025c0 Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:54:54 +0700 Subject: [PATCH 2/6] Test ci --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a4f3dd..61614ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,9 @@ jobs: - name: Set up Android SDK uses: android-actions/setup-android@v3 + - name: TEST + run: git tag -l + - name: TEST run: git describe --tags --abbrev=0 From c0b6cd54b8c16b183c48acd766f7b278182cda3f Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:55:08 +0700 Subject: [PATCH 3/6] Test ci --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 75de768..d2b652d 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -6,7 +6,7 @@ on: - main pull_request: branches: - - main + - mainn jobs: build: From 56d31d78fa8a9ec2352017726b04f9a9b57a0e12 Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:57:36 +0700 Subject: [PATCH 4/6] Test ci --- .github/workflows/dev.yml | 8 +++++- .github/workflows/release.yml | 47 ++++++++++++++--------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index d2b652d..dc2733a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -6,7 +6,7 @@ on: - main pull_request: branches: - - mainn + - main jobs: build: @@ -40,6 +40,12 @@ jobs: restore-keys: | gradle- + - name: TEST + run: git tag -l + + - name: TEST + run: git describe --tags --abbrev=0 + - name: Build app run: ./gradlew assembleDebug diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61614ce..091c167 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,12 +2,9 @@ name: Build & Release on: workflow_dispatch: -# push: -# tags: -# - 'v*.*' - pull_request: - branches: - - main + push: + tags: + - 'v*.*' jobs: build: @@ -31,12 +28,6 @@ jobs: - name: Set up Android SDK uses: android-actions/setup-android@v3 - - name: TEST - run: git tag -l - - - name: TEST - run: git describe --tags --abbrev=0 - - name: Build app run: ./gradlew assembleRelease @@ -55,20 +46,20 @@ jobs: run: | mv "${{ steps.sign_app.outputs.signedFile }}" "app-release.apk" - - name: Create changelog - id: changelog - uses: requarks/changelog-action@v1 - with: - token: ${{ github.token }} - tag: ${{ github.ref_name }} - includeInvalidCommits: true - excludeTypes: build,chore - writeToFile: false - -# - name: Create release -# uses: softprops/action-gh-release@v2 +# - name: Create changelog +# id: changelog +# uses: requarks/changelog-action@v1 # with: -# body: ${{ steps.changelog.outputs.changes }} -# files: "app-release.apk" -# fail_on_unmatched_files: true -# make_latest: true +# token: ${{ github.token }} +# tag: ${{ github.ref_name }} +# includeInvalidCommits: true +# excludeTypes: build,chore +# writeToFile: false + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + body: ChangeLog + files: "app-release.apk" + fail_on_unmatched_files: true + make_latest: true From 62fd2452b94d4e067874e92af70d0cffd3a24b2b Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:05:09 +0700 Subject: [PATCH 5/6] Test ci --- app/build.gradle.kts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 076f293..2a2e24f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -8,16 +8,12 @@ android { namespace = "com.paulcoding.hviewer" compileSdk = 35 - val latestTag = providers.exec { - commandLine = "git describe --tags --abbrev=0".split(' ') - }.standardOutput.asText.get().trim().replaceFirst("v", "") - defaultConfig { applicationId = "com.paulcoding.hviewer" minSdk = 26 targetSdk = 34 versionCode = 1 - versionName = latestTag + versionName = "1.2.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } From 028f29f4a68c0860d3922ccf7ecf28d2bcf05443 Mon Sep 17 00:00:00 2001 From: longnghia <41385034+longnghia@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:09:16 +0700 Subject: [PATCH 6/6] Update CI --- .github/workflows/dev.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index dc2733a..75de768 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -40,12 +40,6 @@ jobs: restore-keys: | gradle- - - name: TEST - run: git tag -l - - - name: TEST - run: git describe --tags --abbrev=0 - - name: Build app run: ./gradlew assembleDebug