Open-source alternative Instagram client on Android. More maintainers needed!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.4 KiB

4 years ago
  1. name: Github pre-release
  2. on: workflow_dispatch
  3. # push:
  4. # branches: [ master ]
  5. # pull_request:
  6. # branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v2
  13. - name: set up JDK 1.8
  14. uses: actions/setup-java@v2
  15. with:
  16. distribution: 'zulu'
  17. java-version: '8'
  18. - name: Grant execute permission for gradlew
  19. run: chmod +x gradlew
  20. - name: Build Github unsigned pre-release apk
  21. run: ./gradlew assembleGithubRelease --stacktrace --project-prop pre --project-prop split
  22. - name: Sign APK
  23. uses: ammargitham/[email protected]
  24. # ID used to access action output
  25. id: sign_app
  26. with:
  27. releaseDirectory: app/build/outputs/apk/github/release
  28. signingKeyBase64: ${{ secrets.SIGNING_KEY }}
  29. alias: ${{ secrets.ALIAS }}
  30. keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
  31. keyPassword: ${{ secrets.KEY_PASSWORD }}
  32. - name: Get current date and time
  33. id: date
  34. run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')"
  35. # Create artifact
  36. - name: Create apk artifact
  37. uses: actions/upload-artifact@v2
  38. with:
  39. name: barinsta_pre-release_${{ steps.date.outputs.date }}
  40. # path: ${{steps.sign_app.outputs.signedReleaseFile}}
  41. path: app/build/outputs/apk/github/release/*-signed.apk
  42. # Send success notification
  43. - name: Send success Telegram notification
  44. if: ${{ success() }}
  45. uses: appleboy/telegram-action@master
  46. with:
  47. to: ${{ secrets.TELEGRAM_BUILDS_CHANNEL_TO }}
  48. token: ${{ secrets.TELEGRAM_BUILDS_BOT_TOKEN }}
  49. message: "${{ github.workflow }} ${{ github.job }} #${{ github.run_number }} completed successfully.\nURL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
  50. # document: ${{steps.sign_app.outputs.signedReleaseFile}}
  51. document: app/build/outputs/apk/github/release/*-signed.apk
  52. # Send failure notification
  53. - name: Send failure Telegram notification
  54. if: ${{ failure() }}
  55. uses: appleboy/telegram-action@master
  56. with:
  57. to: ${{ secrets.TELEGRAM_BUILDS_CHANNEL_TO }}
  58. token: ${{ secrets.TELEGRAM_BUILDS_BOT_TOKEN }}
  59. message: "${{ github.workflow }} ${{ github.job }} #${{ github.run_number }} failed.\nURL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"