前提
Unity製の Android アプリを Github の Actions を利用し、DeployGate へアップロードするまでの流れを作成しております。
curl コマンドを利用してアップロードする際にエラーメッセージが発生してしまいました。
実現したいこと
- curl コマンドで DeployGate へアップロード
発生している問題・エラーメッセージ
Run curl \ curl \ -H "Authorization: token ***" \ -F "file=@/Users/mac/Downloads/Android.apk" \ -F "message=test" \ -v "https://deploygate.com/api/users/***/apps" shell: /usr/bin/bash -e {0} curl: (26) Failed to open/read local data from file/application Error: Process completed with exit code 26.
該当のソースコード
yml
1name: Deploy CI 2 3on: 4 workflow_dispatch: {} 5 6jobs: 7 build: 8 runs-on: ubuntu-latest 9 10 steps: 11 - name: Distribute App 12 run: | 13 curl \ 14 -H "Authorization: token ${{secrets.DEPLOY_GATE_API_KEY}}" \ 15 -F "file=@/Users/mac/Downloads/Android.apk" \ 16 -F "message=test" \ 17 -v "https://deploygate.com/api/users/${{secrets.DEPLOY_GATE_USER_NAME}}/apps"
試したこと
① パス指定以外でミスがないか確認のために -F "file=@/Users/mac/Downloads/Android.apk" \ の部分を削除して実行したところ、下記エラーが表示されたものの接続自体は通り Job が正常終了しました。
{"message":"validation failed","errors":["File can't be blank","File parameter must be a file part."],"because":"validation failed","error":true}
② 以下のフォルダパスで実行しましたが同じエラーで通りませんでした。
・/Users/mac/Downloads/Android.apk
・/Users/mac/actions-runner/_work/test-actions/test-actions/Builds/Android.apk
補足情報
macOS Monterey バージョン 12.4
Unity Editor バージョン 2021.3.5f1
参考にしたサイトURL
https://docs.deploygate.com/reference/upload
https://qiita.com/dosukoi_android/items/e41f5c2c2a7120685af8
https://zenn.dev/ss_shiraki/articles/53fb6b5d3a2d69
あなたの回答
tips
プレビュー