Skip to content

Commit

Permalink
ci: build android apk artifact on release
Browse files Browse the repository at this point in the history
  • Loading branch information
ignyx committed Sep 2, 2024
1 parent 5b94167 commit f3b677b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release Workflow

on:
release:
types:
- created

concurrency:
group: release_workflow
cancel-in-progress: true

jobs:
build-android:
runs-on: ubuntu-latest
environment: build

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get tag
id: tag
run: echo "::set-output name=tag::`git describe --tags`"
- name: Install dependencies
run: npm ci
- uses: szenius/[email protected]
with:
timezoneLinux: 'Europe/Paris'
timezoneMacos: 'Europe/Paris'
- name: add keys
run: |
mkdir -p android/keystores
echo "${{ secrets.KEYSTORE_PROPERTIES_64 }}" | base64 -d > android/keystores/release.keystore.properties
echo "${{ secrets.JKS_64 }}" | base64 -d > android/app/application-amicale.jks
- name: build
run: npm run apk
- name: Upload to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: android/app/build/outputs/apk/release/app-release.apk
asset_name: campus-${{steps.tag.outputs.tag}}.apk
asset_content_type: application/vnd.android.package-archive
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"full-check": "npm run typescript && npm run lint && npm run test",
"pod": "cd ios && pod install && cd ..",
"bundle": "cd android && ./gradlew bundleRelease",
"apk": "cd android && ./gradlew assembleRelease",
"clean": "react-native-clean-project",
"postversion": "react-native-version",
"test-locales": "node ./scripts/test-locales.js"
Expand Down

0 comments on commit f3b677b

Please sign in to comment.