-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: dependencies management and publishing workflow updates (#21)
* chore: Dependencies management and publishing workflow updates (#20) * chore: updated dependencies management * chore: updated process to upload artifacts * chore: added ci workflow for snapshot * chore: ignore idea file changes * chore: updated git ignore to cater idea files * chore: fixed untracked files * chore: added missing dependencies * fix: workflow wrong assemble command * Added staging profile id in secrets * Updated signing keys secrets * Updated signing id secrets * Added semantic versioning to snapshots * Added missing plugins to dry run * Added all missing plugins for snapshot release * Updated CI workflow for publishing snapshots * Updated semantic release config * Version issue in snapshot deployment * Versioning error on sonar type * Switching back to commit hash as version number * Lowercased snapshot for possible bad request fix * Snapshot failing possible fix * Snapshot test - Checking if same snapshot artifact gets updated * Updated workflow for release artifact * Code cleanup - Lint - Documentation * Removed Kotlin reflect library * Renamed artifact id to be consistent with iOS
- Loading branch information
Showing
27 changed files
with
373 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Publish Snapshot builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
publish: | ||
name: Snapshot build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
|
||
# Get just version number for semantic snapshot release. It would just dry run and not publish, release | ||
- name: Run semantic release to get version | ||
uses: cycjimmy/semantic-release-action@v2 | ||
id: semantic | ||
with: | ||
# version numbers below can be in many forms: M, M.m, M.m.p | ||
semantic_version: 17 | ||
branch: develop | ||
extra_plugins: | | ||
@semantic-release/commit-analyzer@8 | ||
@semantic-release/release-notes-generator@9 | ||
@semantic-release/changelog@5 | ||
@semantic-release/git@9 | ||
@semantic-release/github@7 | ||
@semantic-release/exec@5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }} | ||
|
||
- name: Release build | ||
# assembleRelease for all modules, excluding non-library modules: app, docs | ||
run: ./gradlew assembleRelease -x :app:assembleRelease | ||
- name: Source jar and dokka | ||
run: ./gradlew androidSourcesJar javadocJar | ||
|
||
- name: Add MODULE_VERSION env property | ||
run: echo "MODULE_VERSION=`echo ${{ steps.semantic.outputs.new_release_version }}`-SNAPSHOT" >> $GITHUB_ENV | ||
|
||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.GRADLE_PUBLISH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.GRADLE_PUBLISH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.GRADLE_SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSPHRASE }} | ||
SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_PRIVATE_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SNAPSHOT: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"branches": [ | ||
"main", | ||
{ "name": "beta", "prerelease": true }, | ||
{ "name": "alpha", "prerelease": true } | ||
"tagFormat": "${version}", | ||
"branches": [ | ||
"main", | ||
{ | ||
"name": "beta", | ||
"prerelease": true | ||
}, | ||
{ | ||
"name": "alpha", | ||
"prerelease": true | ||
} | ||
], | ||
"dryRun": true, | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "MODULE_VERSION=${nextRelease.version} ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository" | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/exec", { | ||
"prepareCmd": "MODULE_VERSION=${nextRelease.version} ./gradlew :sdk:uploadArchives" | ||
}], | ||
["@semantic-release/changelog",{ | ||
"changelogFile": "CHANGELOG.md" | ||
}], | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
] | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
package io.customer.example | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class MainApplication : Application() |
Oops, something went wrong.