Test release Action #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- version.txt | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Build APK | |
run: ./gradlew assembleRelease | |
env: | |
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} | |
- name: Extract version name | |
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV | |
- name: Create release | |
id: release | |
uses: release-drafter/release-drafter@v5 | |
with: | |
tag: ${{ env.VERSION }} | |
publish: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.VERSION }} | |
files: app/build/outputs/apk/release/app-release.apk |