Skip to content

Commit 661c8df

Browse files
test(ci): add workflow to test release process
1 parent 4ace53a commit 661c8df

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

.github/workflows/publish_android_maven_central.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ on:
2121

2222
jobs:
2323
publish-android:
24-
if: github.ref == 'refs/heads/main'
2524
runs-on: ubuntu-latest
2625
timeout-minutes: 60
2726
permissions:

.github/workflows/publish_ios_cocoapods_trunk.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
jobs:
1313
publish-ios:
1414
runs-on: macos-15
15-
if: github.ref == 'refs/heads/main'
1615
timeout-minutes: 30
1716
steps:
1817
- run: sudo xcode-select --switch /Applications/Xcode_16.app
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "[TEMPORARY] Test native Android and iOS Plugin release pipeline"
2+
3+
on:
4+
push:
5+
branches:
6+
- test/RMET-4491/publish-pipelines
7+
jobs:
8+
setup:
9+
uses: ./.github/workflows/reusable_setup.yml
10+
secrets:
11+
THE_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
12+
13+
release-android:
14+
needs: ['setup']
15+
uses: ./.github/workflows/publish_android_maven_central.yml
16+
secrets:
17+
ANDROID_CENTRAL_USERNAME: ${{ secrets.ANDROID_CENTRAL_USERNAME }}
18+
ANDROID_CENTRAL_PASSWORD: ${{ secrets.ANDROID_CENTRAL_PASSWORD }}
19+
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
20+
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
21+
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
22+
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }}
23+
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
24+
25+
release-ios:
26+
needs: ['setup']
27+
uses: ./.github/workflows/publish_ios_cocoapods_trunk.yml
28+
secrets:
29+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
30+
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

scripts/publish-android.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ publish_plugin_android () {
3636
export PLUGIN_SCM="github.com:ionic-team/capacitor-keyboard"
3737

3838
# Build and publish
39-
"$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1
39+
"$ANDROID_PATH"/gradlew clean build --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1
4040

4141
if grep --quiet "BUILD SUCCESSFUL" $LOG_OUTPUT; then
4242
printf %"s\n\n" "Success: $PLUGIN_NAME published to MavenCentral."

scripts/publish-ios.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ publish_plugin_ios () {
3333
mkdir -p ./tmp
3434
# publish to Trunk
3535
printf %"s\n" "Attempting to build and publish plugin $PLUGIN_NAME for version $PLUGIN_VERSION to production..."
36-
pod trunk push $PODSPEC_FILE_PATH --allow-warnings > $LOG_OUTPUT 2>&1
36+
pod spec lint $PODSPEC_FILE_PATH --allow-warnings > $LOG_OUTPUT 2>&1
3737
if grep -q "passed" $LOG_OUTPUT; then
3838
printf %"s\n\n" "Success: $PLUGIN_NAME published to CocoaPods Trunk."
3939
else

0 commit comments

Comments
 (0)