Skip to content

Commit 3a5de83

Browse files
committed
feature: support binary upload and publish flow trigger as independent options
1 parent de84954 commit 3a5de83

6 files changed

Lines changed: 564 additions & 66 deletions

File tree

README.md

Lines changed: 78 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
## Appcircle Publish
22

3-
Upload an application binary (`.ipa`, `.apk`, or `.aab`) directly to an Appcircle
4-
**Publish** profile from your GitHub workflow. The uploaded binary becomes a new
5-
app version on the target Publish profile, ready for the profile's configured
6-
app store publishing flow.
3+
Upload an application binary to an Appcircle **Publish** profile and/or trigger
4+
its publish flow (app store publishing) directly from your GitHub workflow.
75

86
Learn more about
97
[Appcircle Publish](https://appcircle.io/publish-to-stores?utm_source=github&utm_medium=plugin&utm_campaign=publish).
@@ -31,33 +29,90 @@ To generate a Personal API Token:
3129

3230
![Token Generation](images/PAT.png)
3331

32+
## What the action does
33+
34+
The action has two independent switches — `upload` and `publish` — both default
35+
to `false`. **You must enable at least one.** Create the Publish profile in
36+
Appcircle first; the action targets it by name (profile names are unique per
37+
platform).
38+
39+
| `upload` | `publish` | Behavior |
40+
|:--------:|:---------:|----------|
41+
| `true` | `false` | Upload `appPath` as a new app version on the profile. |
42+
| `false` | `true` | Trigger the publish flow for the profile's **current release candidate**. |
43+
| `true` | `true` | Upload `appPath`, **mark the new version as release candidate**, then trigger the publish flow for it. |
44+
| `false` | `false` | Error — nothing to do. |
45+
46+
**Rules:**
47+
48+
- **In-progress guard:** if a publish is already running for the target profile,
49+
the action does **not** start a new one and fails fast.
50+
- **Release candidate:** when both `upload` and `publish` are `true`, the freshly
51+
uploaded version is automatically marked as the release candidate before it is
52+
published. In publish-only mode, the profile's existing release candidate is
53+
published.
54+
- **Progress:** while publishing, the action polls the publish status and prints
55+
step-by-step progress until the flow succeeds or fails.
56+
57+
> **Manual-approval steps:** if the profile's publish flow contains a manual step
58+
> (e.g. "Get Approval via Email"), the flow will wait for that action and the
59+
> plugin will keep polling until it completes or the poll times out. For CI use,
60+
> prefer publish flows without manual gates.
61+
3462
## How to use Appcircle Publish Action
3563

36-
This action uploads a binary to an existing Publish profile. Create the Publish
37-
profile in Appcircle first, then reference it by name. Publish profile names are
38-
unique per platform.
64+
**Upload only:**
3965

4066
```yml
41-
- name: Upload App to Appcircle Publish
42-
id: upload-to-appcircle-publish
67+
- name: Upload to Appcircle Publish
4368
uses: appcircleio/appcircle-publish-githubaction
4469
with:
4570
personalAPIToken: ${{ secrets.AC_PERSONAL_API_TOKEN }}
46-
platform: PLATFORM # "ios" or "android"
71+
platform: ios # or android
4772
publishProfile: PUBLISH_PROFILE_NAME
48-
appPath: APP_PATH
73+
upload: 'true'
74+
appPath: ./app.ipa
4975
```
5076
51-
- `personalAPIToken`: The Appcircle Personal API token is utilized to
52-
authenticate and secure access to Appcircle services, ensuring that only
53-
authorized users can perform actions within the platform.
54-
- `platform`: Target platform of the Publish profile. Must be `ios` or
77+
**Publish only (publishes the profile's current release candidate):**
78+
79+
```yml
80+
- name: Trigger Appcircle Publish
81+
uses: appcircleio/appcircle-publish-githubaction
82+
with:
83+
personalAPIToken: ${{ secrets.AC_PERSONAL_API_TOKEN }}
84+
platform: ios
85+
publishProfile: PUBLISH_PROFILE_NAME
86+
publish: 'true'
87+
```
88+
89+
**Upload and publish (uploads, marks it release candidate, then publishes):**
90+
91+
```yml
92+
- name: Upload and Publish to Appcircle
93+
uses: appcircleio/appcircle-publish-githubaction
94+
with:
95+
personalAPIToken: ${{ secrets.AC_PERSONAL_API_TOKEN }}
96+
platform: android
97+
publishProfile: PUBLISH_PROFILE_NAME
98+
upload: 'true'
99+
publish: 'true'
100+
appPath: ./app.aab
101+
```
102+
103+
### Inputs
104+
105+
- `personalAPIToken` (required): Appcircle Personal API Token used to
106+
authenticate and secure access to Appcircle services.
107+
- `platform` (required): Target platform of the Publish profile — `ios` or
55108
`android`.
56-
- `publishProfile`: Name of the Publish profile to upload the binary to. The
57-
name is resolved to the profile for the selected platform.
58-
- `appPath`: Indicates the file path to the application that will be uploaded to
59-
the Appcircle Publish profile. For iOS use a `.ipa` file; for Android use an
60-
`.apk` or `.aab` file.
109+
- `publishProfile` (required): Name of the Publish profile to target. Resolved to
110+
the profile for the selected platform.
111+
- `upload` (optional, default `false`): Upload `appPath` as a new app version.
112+
- `publish` (optional, default `false`): Trigger the profile's publish flow.
113+
- `appPath` (required when `upload` is `true`): Path to the application file. For
114+
iOS use a `.ipa` file; for Android use a `.apk` or `.aab` file.
115+
- `authEndpoint` / `apiEndpoint` (optional): self-hosted endpoints — see below.
61116

62117
### Self-Hosted Appcircle
63118

@@ -68,13 +123,13 @@ they default to the Appcircle cloud (`https://auth.appcircle.io` and
68123
change.
69124

70125
```yml
71-
- name: Upload App to Appcircle Publish
126+
- name: Trigger Appcircle Publish
72127
uses: appcircleio/appcircle-publish-githubaction
73128
with:
74129
personalAPIToken: ${{ secrets.AC_PERSONAL_API_TOKEN }}
75-
platform: PLATFORM # "ios" or "android"
130+
platform: ios
76131
publishProfile: PUBLISH_PROFILE_NAME
77-
appPath: APP_PATH
132+
publish: 'true'
78133
authEndpoint: https://auth.your-appcircle-domain.com
79134
apiEndpoint: https://api.your-appcircle-domain.com
80135
```

action.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: 'Appcircle Publish'
22
author: 'appcircleio'
3-
description: 'Upload an application binary to an Appcircle Publish profile.'
3+
description:
4+
'Upload a binary to an Appcircle Publish profile and/or trigger its publish
5+
flow.'
46

57
branding:
68
icon: 'upload-cloud'
@@ -28,15 +30,29 @@ inputs:
2830
required: true
2931
publishProfile:
3032
description:
31-
'Name of the Publish profile to upload the binary to. Profile names are
32-
unique per platform.'
33+
'Name of the Publish profile to target. Profile names are unique per
34+
platform.'
3335
required: true
36+
upload:
37+
description:
38+
"Upload the binary at 'appPath' as a new app version on the profile.
39+
Defaults to false. At least one of 'upload' or 'publish' must be true."
40+
required: false
41+
default: 'false'
42+
publish:
43+
description:
44+
"Trigger the profile's publish flow. Defaults to false. When both 'upload'
45+
and 'publish' are true, the freshly uploaded version is marked as release
46+
candidate and published; when only 'publish' is true, the profile's
47+
current release candidate is published. A new publish is never started if
48+
one is already in progress for the profile."
49+
required: false
50+
default: 'false'
3451
appPath:
3552
description:
36-
'Specify the path to your application file. For iOS, this can be a .ipa
37-
file path. For Android, specify the .apk or .aab file
38-
path'
39-
required: true
53+
"Path to the application file. Required when 'upload' is true. For iOS use
54+
a .ipa file; for Android use a .apk or .aab file."
55+
required: false
4056
runs:
4157
using: 'node20'
4258
main: 'dist/index.js'

0 commit comments

Comments
 (0)