Skip to content

Commit

Permalink
Merge pull request #51 from trustedshops-public/develop
Browse files Browse the repository at this point in the history
Prepare Release 1.0.1 of trustbadge library.
  • Loading branch information
irockel authored Jan 10, 2024
2 parents 240ae8c + 21d4de3 commit 24f830d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
40 changes: 35 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- store_artifacts:
path: library/build/mergedReportDir

deploy:
deploy-snapshot:
executor: android-docker
steps:
- checkout
Expand All @@ -87,10 +87,30 @@ jobs:
command: |
echo -e "$GPG_PRIVATE_KEY" | gpg --import --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback
echo -e "$GPG_PRIVATE_KEY" | gpg --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
- run:
name: Publish release
- run:
name: Publish Snapshot Release
command: |
./gradlew publish -Psigning.secretKeyRingFile=/home/circleci/.gnupg/secring.gpg -Psigning.password="${GPG_PASSPHRASE}" -Psigning.keyId="${GPG_KEY_ID}" -PbuildRelease=true
DEPLOY_VERSION="1.1.0-SNAPSHOT" && ./gradlew publish -Psigning.secretKeyRingFile=/home/circleci/.gnupg/secring.gpg -Psigning.password="${GPG_PASSPHRASE}" -Psigning.keyId="${GPG_KEY_ID}" -PbuildRelease=true
deploy-release:
executor: android-docker
steps:
- checkout
- restore_gradle_cache
- run:
name: Prepare for release
command: |
./gradlew generatePomFileForReleasePublication
- run:
name: Import GPG key
command: |
echo -e "$GPG_PRIVATE_KEY" | gpg --import --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback
echo -e "$GPG_PRIVATE_KEY" | gpg --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
- run:
name: Publish Snapshot Release
command: |
DEPLOY_VERSION="1.0.1" && ./gradlew publish -Psigning.secretKeyRingFile=/home/circleci/.gnupg/secring.gpg -Psigning.password="${GPG_PASSPHRASE}" -Psigning.keyId="${GPG_KEY_ID}" -PbuildRelease=true
distribute-dev:
executor: android-docker
Expand Down Expand Up @@ -130,7 +150,7 @@ workflows:
workflow:
jobs:
- android-test
- deploy:
- deploy-snapshot:
name: deploy-snapshot
context:
- gpg
Expand All @@ -141,6 +161,16 @@ workflows:
branches:
ignore:
- main
- deploy-release:
name: deploy-release
context:
- gpg
- maven-central
requires:
- android-test
filters:
branches:
only: main
- distribute-dev:
name: distribute-dev
requires:
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import java.io.FileInputStream
import java.util.*

group = "io.github.trustedshops-public"
version = "0.0.${System.getenv("CIRCLE_BUILD_NUM") ?: "1"}-SNAPSHOT"
version = "1.0.0-SNAPSHOT"

plugins {
id("com.android.library")
Expand Down Expand Up @@ -128,7 +128,7 @@ publishing {
//version = "1.1.${System.getenv("CIRCLE_BUILD_NUM") ?: "1"}-SNAPSHOT"
// Snapshot mechanism does a build versioning for itself, adding a build number
// will only confuse the Snapshot mechanism.
version = "1.1.0-SNAPSHOT"
version = System.getenv("DEPLOY_VERSION") ?: "1.0.0-SNAPSHOT"

afterEvaluate {
from(components["release"])
Expand Down

0 comments on commit 24f830d

Please sign in to comment.