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.

69 lines
2.4 KiB

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