mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-08 07:57:28 +00:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Github pre-release build
|
|
|
|
on: workflow_dispatch
|
|
# push:
|
|
# branches: [ master ]
|
|
# pull_request:
|
|
# branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: set up JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build Github unsigned pre-release apk
|
|
run: ./gradlew assembleGithubRelease --stacktrace --project-prop pre
|
|
|
|
- name: Sign APK
|
|
uses: r0adkll/sign-android-release@v1
|
|
# ID used to access action output
|
|
id: sign_app
|
|
with:
|
|
releaseDirectory: app/build/outputs/apk/github/release
|
|
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
|
alias: ${{ secrets.ALIAS }}
|
|
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
|
|
|
- name: Get current date and time
|
|
id: date
|
|
run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')"
|
|
|
|
# Create artifact
|
|
- name: Create apk artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: barinsta_pre-release_${{ steps.date.outputs.date }}
|
|
path: ${{steps.sign_app.outputs.signedReleaseFile}}
|
|
|
|
# Send Telegram notification
|
|
- name: Send Telegram notification
|
|
uses: appleboy/telegram-action@master
|
|
with:
|
|
to: ${{ secrets.TELEGRAM_BUILDS_CHANNEL_TO }}
|
|
token: ${{ secrets.TELEGRAM_BUILDS_BOT_TOKEN }}
|
|
message: Build successful
|
|
document: ${{steps.sign_app.outputs.signedReleaseFile}}
|