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.

67 lines
2.3 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
  20. - name: Sign APK
  21. uses: r0adkll/sign-android-release@v1
  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. # Send success notification
  40. - name: Send success Telegram notification
  41. if: ${{ success() }}
  42. uses: appleboy/telegram-action@master
  43. with:
  44. to: ${{ secrets.TELEGRAM_BUILDS_CHANNEL_TO }}
  45. token: ${{ secrets.TELEGRAM_BUILDS_BOT_TOKEN }}
  46. message: "${{ github.workflow }} ${{ github.job }} #${{ github.run_number }} completed successfully.\nhttps://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
  47. document: ${{steps.sign_app.outputs.signedReleaseFile}}
  48. # Send failure notification
  49. - name: Send failure Telegram notification
  50. if: ${{ failure() }}
  51. uses: appleboy/telegram-action@master
  52. with:
  53. to: ${{ secrets.TELEGRAM_BUILDS_CHANNEL_TO }}
  54. token: ${{ secrets.TELEGRAM_BUILDS_BOT_TOKEN }}
  55. message: "${{ github.workflow }} ${{ github.job }} #${{ github.run_number }} failed.\nhttps://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"