78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
when:
|
|
- event: [push, pull_request, manual, deployment, tag, release, pull_request]
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
image: node:latest
|
|
commands:
|
|
- npm i
|
|
|
|
- name: Build web app
|
|
image: node:latest
|
|
commands:
|
|
- npm run build
|
|
|
|
- name: Ionic sync
|
|
image: node:latest
|
|
commands:
|
|
- npx cap sync
|
|
|
|
- name: Build Android app
|
|
image: mingc/android-build-box
|
|
commands:
|
|
- cd android
|
|
- bash -c "chmod +x gradlew; ./gradlew assemble"
|
|
|
|
- name: Check if app is here
|
|
image: node:latest
|
|
commands:
|
|
- ls ./
|
|
- ls ./android/app/
|
|
- ls ./android/app/build/
|
|
- ls ./android/app/build/outputs/
|
|
- ls ./android/app/build/outputs/apk/
|
|
- ls ./android/app/build/outputs/apk/debug
|
|
|
|
- name: Publish app
|
|
image: ocram85/plugin-gitea-package:latest
|
|
pull: true
|
|
secrets: [ gitea_user, gitea_passwd ]
|
|
settings:
|
|
user:
|
|
from_secret: gitea_user
|
|
password:
|
|
from_secret: gitea_passwd
|
|
debug: "true"
|
|
<<<<<<< HEAD
|
|
owner: "plugins"
|
|
package_name: "dummy_package"
|
|
package_version: ${CI_COMMIT_TAG}
|
|
=======
|
|
owner: "iHackFX"
|
|
package_name: "library"
|
|
package_version: "0.1.0"
|
|
>>>>>>> test-woodpecker
|
|
file_source: "./android/app/build/outputs/apk/debug/app-debug.apk"
|
|
file_name: "app-debug.apk"
|
|
update: "true"
|
|
when:
|
|
event: release
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- name: Comment
|
|
image: mcs94/gitea-comment
|
|
settings:
|
|
gitea_address: http://gitea.192.168.0.100.nip.io:3000/
|
|
gitea_token:
|
|
from_secret: woodpecker_bot_token
|
|
comment: >
|
|
✅ Build ${CI_BUILD_EVENT} of `${CI_REPO_NAME}` has status `${CI_BUILD_STATUS}`.
|
|
|
|
📝 Commit by ${CI_COMMIT_AUTHOR} on `${CI_COMMIT_BRANCH}`:
|
|
|
|
`${CI_COMMIT_MESSAGE}`
|
|
|
|
🌐 ${CI_BUILD_LINK}
|
|
when:
|
|
event: [pull_request]
|