-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jnelle <[email protected]> ci: add missing distribution Signed-off-by: jnelle <[email protected]> Update android.yml Update android.yml Update android.yml Update android.yml chore: add signingconfig Signed-off-by: jnelle <[email protected]> ci: change path to apk Signed-off-by: jnelle <[email protected]> Update android.yml Update android.yml Update android.yml Update android.yml ci: use github token Signed-off-by: jnelle <[email protected]>
- Loading branch information
Showing
3 changed files
with
93 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 21 | ||
distribution: 'zulu' | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Retrieve the keystore and decode it to a file | ||
env: | ||
ANDROID_RELEASE_KEYSTORE_FILE: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE }} | ||
run: | | ||
mkdir release | ||
echo $ANDROID_RELEASE_KEYSTORE_FILE | base64 --decode > release/release.keystore | ||
- name: Write local.properties | ||
env: | ||
ANDROID_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }} | ||
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }} | ||
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }} | ||
run: | | ||
echo androidReleaseStoreFile=/release/release.keystore >> local.properties | ||
echo androidReleaseStorePassword=$ANDROID_RELEASE_KEYSTORE_PASSWORD >> local.properties | ||
echo androidReleaseKeyAlias=$ANDROID_RELEASE_KEY_ALIAS >> local.properties | ||
echo androidReleaseKeyPassword=$ANDROID_RELEASE_KEY_PASSWORD >> local.properties | ||
- name: Build release apk | ||
run: ./gradlew :composeApp:assembleRelease | ||
- name: Get Next Version | ||
id: semver | ||
uses: ietf-tools/semver-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
branch: master | ||
patchList: "ci", "refactor", "fix", "style", "chore" | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
name: ${{ steps.semver.outputs.next }} | ||
body: Changelog Contents | ||
token: ${{ github.token }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release.apk | ||
path: composeApp/build/outputs/apk/release/composeApp-release.apk | ||
|
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