feat: update app name and icon (#18) #5
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: Build and Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-apk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: set up JDK 18 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 18 | |
distribution: temurin | |
- name: Install npm dependencies | |
run: | | |
npm install && npx expo prebuild --platform android | |
- name: Build Android Release | |
run: | | |
cd android && ./gradlew assembleRelease | |
mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/casdoorapp.apk | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: casdoorapp.apk | |
path: android/app/build/outputs/apk/release/ | |
semantic-release: | |
needs: [build-apk] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Download Android build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: casdoorapp.apk | |
path: release/android/ | |
- name: Run semantic-release | |
run: npm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |