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.

70 lines
2.4 KiB

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