-
Notifications
You must be signed in to change notification settings - Fork 604
71 lines (70 loc) · 2.51 KB
/
publish-android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish Native Android Libraries
on:
workflow_call:
secrets:
ANDROID_OSSRH_USERNAME:
required: true
ANDROID_OSSRH_PASSWORD:
required: true
ANDROID_SIGNING_KEY_ID:
required: true
ANDROID_SIGNING_PASSWORD:
required: true
ANDROID_SIGNING_KEY:
required: true
ANDROID_SONATYPE_STAGING_PROFILE_ID:
required: true
CAP_GH_RELEASE_TOKEN:
required: true
inputs:
plugins:
description: 'Specify an optional subset of plugins to publish (space delimited)'
type: string
required: false
default: ''
capacitor-version:
description: 'Optional. Specify the version of Capacitor the plugins should depend on. Must be in mathematical notation, eg: [4.0,5.0) for 4.x versions only, or [4.0,) for 4.x versions and higher'
type: string
required: false
default: ''
workflow_dispatch:
inputs:
plugins:
description: 'Specify an optional subset of plugins to publish (space delimited)'
required: false
default: ''
capacitor-version:
description: 'Optional. Specify the version of Capacitor the plugins should depend on. Must be in mathematical notation, eg: [4.0,5.0) for 4.x versions only, or [4.0,) for 4.x versions and higher'
required: false
default: ''
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Grant execute permission for publishing script
run: chmod +x ./scripts/publish-android.sh
- name: Run publish script
working-directory: ./scripts
env:
GITHUB_PLUGINS: ${{ github.event.inputs.plugins }}
GITHUB_CAPACITOR_VERSION: ${{ github.event.inputs.capacitor-version }}
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