Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
修复编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
qwe7002 committed Nov 28, 2021
1 parent 0ae33d0 commit 9d2d72f
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions .reall_network/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
stages:
- build
- push
- release
- deploy
cache:
key: ${CI_PROJECT_ID}
paths:
Expand All @@ -12,41 +11,37 @@ variables:
REPO: telegram-sms-china
KEYSTORE_SERVER: keystore.git.reallct.uk

release_github:
stage: push
release:master:
dependencies:
- build
stage: deploy
only:
- master
script:
- eval $(ssh-agent -s)
- ssh-add - <<< $(curl https://${KEYSTORE_SERVER}/gitlab-sshkey/id_ecdsa -u gitlab:${key_store_passwd})
- git push --set-upstream [email protected]:${OWNER}/${REPO}.git HEAD:refs/heads/${CI_COMMIT_REF_NAME}

release_nightly_github:
stage: push
only:
- nightly
script:
- eval $(ssh-agent -s)
- ssh-add - <<< $(curl https://${KEYSTORE_SERVER}/gitlab-sshkey/id_ecdsa -u gitlab:${key_store_passwd})
- git push --set-upstream [email protected]:${OWNER}/${REPO}.git HEAD:refs/heads/${CI_COMMIT_REF_NAME}
- apk --update --no-cache add git openssl bash curl wget go
- go get -u -v github.com/tcnksm/ghr
- curl https://${KEYSTORE_SERVER}/gitlab-sshkey/github-key.env -o .reall_network/github-key.env -u gitlab:${key_store_passwd}
- . .reall_network/github-key.env
- git push --set-upstream https://${GITHUB_ACCESS_KEY}@github.com/${OWNER}/${REPO}.git HEAD:refs/heads/${CI_COMMIT_REF_NAME}
- /root/go/bin/ghr -t "${GITHUB_ACCESS_KEY}" -u "${OWNER}" -r "${REPO}" "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}-$(date "+%Y%m%d%H%M")" "./app/build/outputs/apk/release/app-release.apk"

release_apk:
stage: release
release:nightly:
dependencies:
- build_release
- build
stage: deploy
only:
- master
- nightly
script:
- apk --update --no-cache add git openssl bash curl wget go
- go get -u -v github.com/tcnksm/ghr
- curl https://${KEYSTORE_SERVER}/gitlab-sshkey/github-key.env -o .reall_network/github-key.env -u gitlab:${key_store_passwd}
- . .reall_network/github-key.env
- ghr -t "${GITHUB_ACCESS_KEY}" -u "${OWNER}" -r "${REPO}" -b "$(cat .reall_network/changelog.txt)" "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}-$(date "+%Y%m%d%H%M")" "./app/build/outputs/apk/release/app-release.apk"
- git push --set-upstream https://${GITHUB_ACCESS_KEY}@github.com/${OWNER}/${REPO}.git HEAD:refs/heads/${CI_COMMIT_REF_NAME}
- /root/go/bin/ghr -t "${GITHUB_ACCESS_KEY}" -u "${OWNER}" -r "${REPO}" -c ${CI_COMMIT_REF_NAME} --prerelease "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}-$(date "+%Y%m%d%H%M")" "./app/build/outputs/apk/release/app-release.apk"

build_release:
build:
image: alvrme/alpine-android:android-30-jdk11
stage: build
only:
- master
retry: 2
script:
- git submodule update --init --recursive
- export VERSION_CODE=${CI_PIPELINE_ID}
Expand All @@ -57,7 +52,8 @@ build_release:
- export GRADLE_USER_HOME=$(pwd)/.gradle && mkdir -p ${GRADLE_USER_HOME}
- echo -e "org.gradle.jvmargs=-Xmx1536m\n org.gradle.parallel=true" >> ${GRADLE_USER_HOME}/gradle.properties
- chmod +x ./gradlew
- ./gradlew assembleReleas
- ./gradlew app:copy_language_pack
- ./gradlew assembleRelease
artifacts:
paths:
- app/build/outputs/apk/release/app-release.apk
Expand Down

0 comments on commit 9d2d72f

Please sign in to comment.