Skip to content

Commit

Permalink
Add Android and iOS publishing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeCla committed Mar 3, 2024
1 parent 3ddda5f commit d9d09ba
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "[android] Publish Nativebrik SDK"
on:
workflow_dispatch:
push:
tags:
- 'android.v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup jdk
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: make archive
uses: eskatos/gradle-command-action@v1
run: |
./gradlew makeArchive
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_KEY_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }}
- name: publish to maven central
run: |
ls nativebrik/build/distributions
curl --request POST \
--header "Authorization: Bearer $(echo "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" | base64)" \
--form bundle="@nativebrik/build/distributions/$(ls nativebrik/build/distributions)" \
'https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
20 changes: 20 additions & 0 deletions .github/workflows/publish-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "[ios] Publish Nativebrik SDK"
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'

jobs:
publish:
runs-on: macos-13
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: checkout
uses: actions/checkout@v3
- name: publish to cocoapods
run: pod trunk push --verbose Nativebrik.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

0 comments on commit d9d09ba

Please sign in to comment.