Skip to content

Commit

Permalink
Adding release_notes, git_release_notes, include_git_commit_id and mo…
Browse files Browse the repository at this point in the history
…difying notify option
  • Loading branch information
Massad committed Dec 16, 2021
1 parent cc9d244 commit d24a6d4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Get sample .apk for test purposes
run: wget https://github.com/testappio/cli/raw/main/sample-apps/sample-app.apk
- name: Upload .apk artifact to TestApp.io app distribution
Expand All @@ -15,13 +15,16 @@ jobs:
api_token: ${{secrets.TESTAPPIO_API_TOKEN}}
app_id: ${{secrets.TESTAPPIO_APP_ID}}
file: sample-app.apk
notify: "no"
git_release_notes: true
include_git_commit_id: true
release_notes: ""
notify: true

macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Get sample .ipa for test purposes
run: wget https://github.com/testappio/cli/raw/main/sample-apps/sample-app.ipa
- name: Upload .ipa artifact to TestApp.io app distribution
Expand All @@ -30,4 +33,7 @@ jobs:
api_token: ${{secrets.TESTAPPIO_API_TOKEN}}
app_id: ${{secrets.TESTAPPIO_APP_ID}}
file: sample-app.ipa
notify: "no"
git_release_notes: false
include_git_commit_id: false
release_notes: "my release notes here..."
notify: true
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# [<img src="https://assets.testapp.io/logo/blue.svg" alt="TestApp.io"/>](https://testapp.io/) Github Action

### Current version: v3.0-BETA

> This is in BETA mode. Your feedback is highly appreciated!
[![Workflow to upload apk and ipa to TestApp.io app distribution](https://github.com/testappio/github-action/actions/workflows/main.yml/badge.svg)](https://github.com/testappio/github-action/actions/workflows/main.yml)
Expand All @@ -14,7 +16,13 @@ This action uploads artifacts (.apk or .ipa) to TestApp.io and notifying your te
> file: artifact to upload (.apk or .ipa)
> notify: **yes** or **no** - to notify your team members in TestApp.io via push notification
> release_notes: manually add the release notes to be displayed for the testers
> git_release_notes: collect release notes from the the git commit message to be displayed for the testers
> include_git_commit_id: include the last git commit ID in the release notes (works with both release notes option)
> notify: notify your team members via a push notification in TestApp.io mobile app
## Requirements

Expand Down Expand Up @@ -49,12 +57,15 @@ jobs:
- name: Upload artifact to TestApp.io
uses: testappio/github-action@v2
uses: testappio/github-action@v3
with:
api_token: ${{secrets.TESTAPPIO_API_TOKEN}}
app_id: ${{secrets.TESTAPPIO_APP_ID}}
file: app/build/outputs/apk/release/app-release-unsigned.apk
notify: "yes"
release_notes: ""
git_release_notes: true
include_git_commit_id: true
notify: true
```

## Sample usage for iOS
Expand Down Expand Up @@ -90,12 +101,15 @@ jobs:
team-id: ${{ secrets.TEAM_ID }}
- name: Upload artifact to TestApp.io
uses: testappio/github-action@v2
uses: testappio/github-action@v3
with:
api_token: ${{ secrets.TESTAPPIO_API_TOKEN }}
app_id: ${{ secrets.TESTAPPIO_APP_ID }}
file: artifacts/output.ipa
notify: "yes"
release_notes: "Testing manual release notes..."
git_release_notes: false
include_git_commit_id: false
notify: true
```

---
Expand Down
14 changes: 13 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ inputs:
file:
description: "Artifact to upload (.apk or .ipa)"
required: true
release_notes:
description: "Release notes will be visible for testers"
required: false
git_release_notes:
description: "Collect the release notes from the last git commit message"
required: false
include_git_commit_id:
description: "Include the last git commit ID with the release notes"
required: false
notify:
description: "Send notificaitons to team members about this release"
required: false
Expand All @@ -20,7 +29,7 @@ branding:
runs:
using: "composite"
steps:
- run: curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash
- run: curl -Ls https://github.com/testappio/cli/releases/download/v1.0.2/install | bash
shell: bash
- run: chmod +x ${{ github.action_path }}/entrypoint.sh
shell: bash
Expand All @@ -29,5 +38,8 @@ runs:
INPUT_API_TOKEN: ${{ inputs.api_token }}
INPUT_APP_ID: ${{ inputs.app_id }}
INPUT_FILE: ${{ inputs.file }}
INPUT_RELEASE_NOTES: ${{ inputs.release_notes }}
INPUT_GIT_RELEASE_NOTES: ${{ inputs.git_release_notes }}
INPUT_INCLUDE_GIT_COMMIT_ID: ${{ inputs.include_git_commit_id }}
INPUT_NOTIFY: ${{ inputs.notify }}
shell: bash
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ if [ "$FILE_EXT" = "ipa" ]; then
IPA_PATH=$FILE
fi

ta-cli publish --api_token="$INPUT_API_TOKEN" --app_id="$INPUT_APP_ID" --release="$RELEASE" --apk="$APK_PATH" --ipa="$IPA_PATH" --notify="$INPUT_NOTIFY"
ta-cli publish --api_token="$INPUT_API_TOKEN" --app_id="$INPUT_APP_ID" --release="$RELEASE" --apk="$APK_PATH" --ipa="$IPA_PATH" --release_notes="$INPUT_RELEASE_NOTES" --git_release_notes=$INPUT_GIT_RELEASE_NOTES --git_commit_id=$INPUT_INCLUDE_GIT_COMMIT_ID --notify=$INPUT_NOTIFY --source="Github Action"

0 comments on commit d24a6d4

Please sign in to comment.