fixed skip ci
#33
Workflow file for this run
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: Android CI | |
on: | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip_ci')" | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Load Twitch secrets | |
uses: ozaytsev86/create-env-file@v1 | |
with: | |
file-name: 'twitch.properties' | |
ENV_client_id: ${{ secrets.CLIENT_ID }} | |
ENV_client_secret: ${{ secrets.CLIENT_SECRET }} | |
- name: Build with Gradle | |
run: ./gradlew lint assembleRelease | |
- name: Upload a build artifact | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: 'releaseApk' | |
path: './app/build/outputs/apk/release/*.apk' | |
- name: Upload a lint report | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: 'lintReport' | |
path: './app/build/reports/lint-results-*.html' | |
- name: Load Keystore config | |
if: github.ref_name == 'main' | |
uses: ozaytsev86/create-env-file@v1 | |
with: | |
file-name: 'keystore.properties' | |
ENV_keystore_password: ${{ secrets.KEYSTORE_PASSWORD }} | |
ENV_keystore_key_password: ${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
ENV_keystore_key_alias: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
- name: Decode Keystore | |
if: github.ref_name == 'main' | |
uses: timheuer/base64-to-file@v1.2 | |
with: | |
fileDir: './app' | |
fileName: 'keystore.jks' | |
encodedString: ${{ secrets.ENCODED_KEYSTORE }} | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
if: github.ref_name == 'main' | |
with: | |
artifacts: "./app/build/outputs/apk/release/*.apk" | |
allowUpdates: true | |
draft: true |