Skip to content

Commit

Permalink
Merge pull request #41 from OutSystems/feat/RMET-3982/update-workflow
Browse files Browse the repository at this point in the history
RMET-3982 - Update workflow to publish library under `io.ionic.libs`
  • Loading branch information
alexgerardojacinto authored Jan 29, 2025
2 parents 11833e4 + 4c77147 commit aea0970
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,4 @@ jobs:
echo "local.properties file has been created successfully."
- name: Run publish script
working-directory: ./scripts
env:
ANDROID_OSSRH_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }}
ANDROID_OSSRH_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }}
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }}
run: ./publish-android.sh
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

- Update `publish-android` workflow to publish library under io.ionic.libs (https://outsystemsrd.atlassian.net/browse/RMET-3982)

## 1.2.1

- Remove unnecessary permissions from AndroidManifest (https://outsystemsrd.atlassian.net/browse/RMET-3987)
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.github.outsystems</groupId>
<artifactId>osinappbrowser-android</artifactId>
<groupId>io.ionic.libs</groupId>
<artifactId>ioninappbrowser-android</artifactId>
<version>1.2.1</version>
</project>
4 changes: 3 additions & 1 deletion scripts/publish-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LOG_OUTPUT=./tmp/publish-android.txt
THE_VERSION=`sed -n 's/.*<version>\(.*\)<\/version>.*/\1/p' ../pom.xml`

# Get latest io.ionic:portals XML version info
PUBLISHED_URL="https://repo1.maven.org/maven2/com/capacitorjs/osinappbrowser-android/maven-metadata.xml"
PUBLISHED_URL="https://repo1.maven.org/maven2/io/ionic/libs/ioninappbrowser-android/maven-metadata.xml"
PUBLISHED_DATA=$(curl -s $PUBLISHED_URL)
PUBLISHED_VERSION="$(perl -ne 'print and last if s/.*<latest>(.*)<\/latest>.*/\1/;' <<< $PUBLISHED_DATA)"

Expand All @@ -20,7 +20,9 @@ else
export SHOULD_PUBLISH=true

printf %"s\n" "Attempting to build and publish version $THE_VERSION"
# Publish a release to the Maven repo
"$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1
# Stage a version
# "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1

echo $RESULT
Expand Down
8 changes: 4 additions & 4 deletions scripts/publish-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ artifacts {
archives androidSourcesJar
}

group = 'com.capacitorjs'
group = 'io.ionic.libs'
version = LIB_VERSION

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
// Coordinates
groupId 'com.capacitorjs'
artifactId 'osinappbrowser-android'
groupId 'io.ionic.libs'
artifactId 'ioninappbrowser-android'
version LIB_VERSION

// Two artifacts, the `aar` (or `jar`) and the sources
Expand All @@ -41,7 +41,7 @@ afterEvaluate {

// POM Data
pom {
name = 'osinappbrowser-android'
name = 'ioninappbrowser-android'
description = 'InAppBrowser Android Lib'
url = 'https://github.com/OutSystems/OSInAppBrowserLib-Android'
licenses {
Expand Down

0 comments on commit aea0970

Please sign in to comment.