Merge branch '45-make-releases-public-and-downloadable' into 'main'

Resolve "make Releases public and downloadable"

Closes #45

See merge request thschleicher/interaktive-systeme!27
This commit is contained in:
jastornig 2023-12-19 16:03:51 +00:00
commit c5795c9227
2 changed files with 41 additions and 27 deletions

View file

@ -16,48 +16,58 @@
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
stages: # List of stages for jobs, and their order of execution
- build
# - test
# - deploy
- release
build-job:
build_job:
image: "reactnativecommunity/react-native-android:latest"
stage: build # This job runs in the build stage, which runs first.
rules:
- if: $COMMIT_BRANCH == "main"
when: manual
- if: $COMMIT_BRANCH != "main"
when: never
script:
- echo $PWD
- echo $CI_PROJECT_DIR
- echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env
- yarn add expo
- npx expo prebuild --platform android
- cd android && ./gradlew assembleRelease
- cd $CI_PROJECT_DIR
- cp android/app/build/outputs/apk/release/app-release.apk finanzfuchs-$CI_COMMIT_REF_NAME.apk
- cp android/app/build/outputs/apk/release/app-release.apk finanzfuchs-is1-group-g-$CI_COMMIT_REF_NAME.apk
- echo RELEASE_APK=finanzfuchs-is1-group-g-$CI_COMMIT_REF_NAME.apk >> environment.env
artifacts:
untracked: false
name: $CI_PROJECT_NAME-group-g-finanzfuchs-$CI_COMMIT_REF_NAME
paths:
- "finanzfuchs-is1-group-g-$CI_COMMIT_REF_NAME.apk"
reports:
dotenv: environment.env
when: on_success
expire_in: 30 days
expire_in: 60 days
when: manual
# unit-test-job: # This job runs in the test stage.
# stage: test # It only starts when the job in the build stage completes successfully.
# script:
# - echo "Running unit tests... This will take about 60 seconds."
# - sleep 60
# - echo "Code coverage is 90%"
# lint-test-job: # This job also runs in the test stage.
# stage: test # It can run at the same time as unit-test-job (in parallel).
# script:
# - echo "Linting code... This will take about 10 seconds."
# - sleep 10
# - echo "No lint issues found."
# deploy-job: # This job runs in the deploy stage.
# stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
# environment: production
# script:
# - echo "Deploying application..."
# - echo "Application successfully deployed."
release_job:
stage: release
image: "registry.gitlab.com/gitlab-org/release-cli:latest"
needs:
- job: build_job
rules:
- if: $COMMIT_BRANCH == "main"
when: manual
- if: $COMMIT_BRANCH != "main"
when: never
release:
tag_name: 'v0.$CI_PIPELINE_IID'
description: 'v0.$CI_PIPELINE_IID create by pipeline'
ref: '$CI_COMMIT_SHA'
assets:
links:
- name: APK
url: '${CI_PROJECT_URL}/-/jobs/${BUILD_JOB_ID}/artifacts/file/${RELEASE_APK}'
script:
- echo "Deploying"

View file

@ -6,6 +6,7 @@
Finanzfuchs
## Installation and Setup
### Run with expo go (ios and Android)
To install and run Finanzfuchs locally:
Required: `npm` (node packet manager), `node.js` (recommended latest stable)
@ -19,6 +20,9 @@ Required: `npm` (node packet manager), `node.js` (recommended latest stable)
3. After installing, just scan the QR Code using the App on Android or the Camera-App on iOS.
5. Alternatively you can use an Emulator using Android SDK or the iOS equivalent. After starting the server, press the prefered Button `a` for Android, `i` for iOS or `w` for Web-View **(Web-View is currently not supported) **
### Prebuilt apk (Android only)
A more convenient way to run Finanzfuchs is to Download the prebuilt apk which can be found under releases in this GitLab repository. This apk file will be kept up to date. Just download and isntall the most recent version.
## Usage
- **Adding Expenses**: Press the plus button to add expenses.
@ -34,4 +38,4 @@ Required: `npm` (node packet manager), `node.js` (recommended latest stable)
- Walcher, Raphael
## License
Finanzfuchs is released under the [MIT License].
Finanzfuchs is released under the [MIT License].