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
44 changes: 44 additions & 0 deletions .github/workflows/netcetera-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Netcetera Update - Create Pull Request
on:
workflow_dispatch:
inputs:
url:
description: 'AAR URL'
required: true
type: string
version:
description: 'Version'
required: true
type: string

permissions:
contents: read

jobs:
netcetera-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download & Unpack
run: |
chmod +x ./netcetera-3ds-core/scripts/download-and-unpack.sh
./netcetera-3ds-core/scripts/download-and-unpack.sh "${{ inputs.url }}"

- name: Update Version
run: |
source netcetera-3ds-core/scripts/update-version.sh "${{ inputs.version }}"
echo "UPDATED_VERSION=$(cat netcetera-3ds-core/version.resolved)" >> $GITHUB_ENV

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.0
with:
token: ${{ secrets.PO_GITHUB_TOKEN }}
add-paths: |
version.resolved
commit-message: Update Netcetera
branch: chore/netcetera-update-${{ env.UPDATED_VERSION }}
delete-branch: true
title: 'chore: Update Netcetera to ${{ env.UPDATED_VERSION }}'
assignees: ${{ github.actor }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension

buildscript {
ext {
androidGradlePluginVersion = '8.13.0'
androidGradlePluginVersion = '8.13.1'
kotlinVersion = '2.1.20'
kspVersion = '2.1.20-1.0.32'
dokkaVersion = '1.9.20'
Expand Down
2 changes: 1 addition & 1 deletion netcetera-3ds-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {

ext {
publishArtifactId = 'processout-android-netcetera-3ds-core'
publishVersion = rootProject.ext.netcetera3dsSdkVersion
publishVersion = file('version.resolved').getText().trim()
publishDescription = 'ProcessOut Android SDK - Netcetera 3DS Core'
}

Expand Down
24 changes: 24 additions & 0 deletions netcetera-3ds-core/scripts/download-and-unpack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <URL>"
exit 1
fi

URL="$1"
FILENAME=$(basename "$URL")
FOLDER="${FILENAME%.*}"

if curl -L "$URL" -o "$FILENAME"; then
echo "Downloaded $FILENAME successfully."
else
echo "Failed to download: $URL"
exit 1
fi

unzip "$FILENAME" -d "$FOLDER"

echo "------ root"
ls -1
echo "------ sdk"
ls -1 "$FOLDER"
8 changes: 8 additions & 0 deletions netcetera-3ds-core/scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <version>"
exit 1
fi

echo -n "$1" > netcetera-3ds-core/version.resolved
1 change: 1 addition & 0 deletions netcetera-3ds-core/version.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.3.1