diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f351e5c..48f4106 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index 0703902..ba97f1d 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # [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) @@ -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 @@ -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 @@ -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 ``` --- diff --git a/action.yml b/action.yml index d34e883..574a760 100755 --- a/action.yml +++ b/action.yml @@ -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 @@ -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 @@ -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 diff --git a/entrypoint.sh b/entrypoint.sh index 66e89f6..b526463 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"