Merge pull request #6 from wednesday110603/main #1
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: Quantum Coin Wallet | |
env: | |
main_project_module: app | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
BuildArtifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Install Dependencies | |
run: | | |
cd ${{ github.workspace }} | |
chmod +x install-android-library-ubuntu.sh | |
./install-android-library-ubuntu.sh | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Build Quantum Coin Wallet APK - ${{ env.main_project_module }} module | |
run: ./gradlew assembleDebug --stacktrace | |
- name: Upload Quantum Coin Wallet APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: quantum-coin-wallet-debug | |
path: ${{ env.main_project_module }}/build/outputs/apk/debug/ | |
Release: | |
name: Release APK | |
runs-on: ubuntu-latest | |
needs: BuildArtifacts | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Generate version string | |
id: version-string | |
run: echo "::set-output name=VERSION_STR::${GITHUB_REF##*/}" | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create a release APK | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "quantum-coin-wallet-debug/*.apk" | |
name: Release ${{ steps.version-string.outputs.VERSION_STR }} | |
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} | |
tag: ${{ steps.version-string.outputs.VERSION_STR }} | |
token: ${{ secrets.GITHUB_TOKEN }} |