Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 0 additions & 104 deletions .circleci/config.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2024 Adobe. All rights reserved.
# Copyright 2025 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand All @@ -10,7 +10,20 @@
# governing permissions and limitations under the License.
#

template: |
## What’s Changed
name: Build and Test

$CHANGES
on:
pull_request:

jobs:
build-and-test:
name: "CI"
uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.3.0
with:
android-api-levels: '[29]'
run-test-unit: true
run-test-functional: true
run-build-app: true
enable-codecov: true
javadoc-build-path: 'code/notificationbuilder/build/dokka/javadoc'
secrets: inherit
85 changes: 27 additions & 58 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,72 +11,41 @@
#

name: Publish Release

on:
workflow_dispatch:
inputs:
tag:
description: 'The tag (version) to be released (ex: 1.2.3).'
type: string
required: true

create-github-release:
description: 'Create GitHub release using tag. If the provided `tag` does not exist, it will be created.'
type: boolean
required: true
default: true

component:
type: choice
description: UI Component to release
description: UI component which will be released.
options:
- notificationbuilder

tag:
description: 'tag/version'
required: true

action_tag:
description: 'Create tag? ("no" to skip)'
core-dependency:
description: 'The Core dependency version in gradle.properties to be validated (ex: 1.2.3).'
type: string
required: true
default: 'yes'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Verify version
run: |
set -eo pipefail
echo Release version: ${{ github.event.inputs.tag }}
(./scripts/version.sh -n ${{ github.event.inputs.component }} -v ${{ github.event.inputs.tag }})

- name: Create GH Release
id: create_release
uses: release-drafter/release-drafter@v5
if: ${{ github.event.inputs.action_tag == 'yes' }}
with:
name: v${{ github.event.inputs.tag }}-${{ github.event.inputs.component }}
tag: v${{ github.event.inputs.tag }}-${{ github.event.inputs.component }}
version: v${{ github.event.inputs.tag }}-${{ github.event.inputs.component }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes

- name: Publish to Maven Central Repository
run: make ${{ github.event.inputs.component }}-publish
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
permissions:
contents: write
uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.3.0
with:
tag: ${{ github.event.inputs.tag }}
create-github-release: ${{ github.event.inputs.create-github-release == 'true' }}
release-variant: ${{ github.event.inputs.component }}
version-validation-paths: code/gradle.properties, code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilder.kt
version-validation-dependencies: Core ${{ github.event.inputs.core-dependency }}
secrets: inherit
52 changes: 13 additions & 39 deletions .github/workflows/maven-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,21 @@
#

name: Publish Snapshot
on:

on:
workflow_dispatch:
inputs:
release_notificationbuilder:
required: false
type: boolean
default: false
description: Release Notification Builder
component:
type: choice
description: UI component for which a snapshot will be released.
options:
- notificationbuilder

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes

- name: Publish NotificationBuilder to Maven Snapshot Repository
if: ${{ inputs.release_notificationbuilder }}
run: make notificationbuilder-publish-snapshot
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
permissions:
contents: write
uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.3.0
with:
release-variant: ${{ github.event.inputs.component }}
secrets: inherit
58 changes: 26 additions & 32 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,37 @@
#

name: Update Versions

on:
workflow_dispatch:
inputs:
notificationbuilder-version:
description: 'New version to use for the NotificationBuilder. Example: 3.0.0'
required: false
version:
description: 'New version to use for the extension (ex: 1.2.3).'
type: string
required: true

branch:
description: 'The target branch where the version update will be applied and the pull request will be merged into.'
type: string
required: true

core-dependency:
description: '[Optional] Update Core dependency in pom.xml. Example: 3.0.0'
description: |
If a version is provided, update Core dependency in gradle.properties (ex: 1.2.3).
This is a published dependency in the pom.xml file.
type: string
required: false
default: ''

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- if: ${{ github.event.inputs.notificationbuilder-version != '' }}
name: Update NotificationBuilder version
run: (sh ./scripts/version.sh -u -n NotificationBuilder -v ${{ github.event.inputs.notificationbuilder-version }} -d "Core ${{ github.event.inputs.core-dependency }}")

- name: Generate Commit Message
shell: bash
run: |
COMMIT_MSG=""
if [ "${{ github.event.inputs.notificationbuilder-version }}" ]; then
COMMIT_MSG="[NotificationBuilder-${{ github.event.inputs.notificationbuilder-version }}]"
fi
echo $COMMIT_MSG
echo COMMIT_MSG=$COMMIT_MSG >> $GITHUB_ENV

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true
commit-message: Update versions ${{ env.COMMIT_MSG }}
title: Update versions ${{ env.COMMIT_MSG }}
body: Update versions ${{ env.COMMIT_MSG }}
update-versions:
permissions:
contents: write
pull-requests: write
uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.3.0
with:
version: ${{ github.event.inputs.version }}
branch: ${{ github.event.inputs.branch }}
dependencies: Core ${{ github.event.inputs.core-dependency }}
paths: code/gradle.properties, code/notificationbuilder/src/main/java/com/adobe/marketing/mobile/notificationbuilder/NotificationBuilder.kt
update: true
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ checkstyle:
checkformat:
(./code/gradlew -p code/notificationbuilder spotlessCheck)

# Used by build and test CI workflow
lint: checkformat checkstyle

format:
(./code/gradlew -p code/notificationbuilder spotlessApply)

Expand Down Expand Up @@ -41,5 +44,5 @@ notificationbuilder-publish-maven-local-jitpack: assemble-phone-release
notificationbuilder-publish-snapshot: assemble-phone-release
(./code/gradlew -p code/notificationbuilder publishReleasePublicationToSonatypeRepository)

notificationbuilder-publish: assemble-phone-release
notificationbuilder-publish-main: assemble-phone-release
(./code/gradlew -p code/notificationbuilder publishReleasePublicationToSonatypeRepository -Prelease)
2 changes: 1 addition & 1 deletion code/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android.useAndroidX=true
#Maven artifacts
#Notification Builder Module
notificationbuilderModuleName=notificationbuilder
notificationbuilderVersion=3.0.2
notificationbuilderVersion=3.0.3
notificationbuilderMavenRepoName=AdobeMobileNotificationBuilderSdk
notificationbuilderMavenRepoDescription=Android Notification Builder library for Adobe Mobile Marketing

Expand Down
Loading
Loading