This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: 应用发布流程 | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
|
||
- name: 检出项目 | ||
uses: actions/checkout@v1 | ||
|
||
- name: 使用JDK 1.8 环境 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: 编译release包 | ||
env: | ||
PWD_GLUT: ${{ secrets.PWD_GLUT }} | ||
# 使用AndResGuard打包 | ||
run: | | ||
chmod +x ./gradlew | ||
./gradlew reRe | ||
- name: 上传产出物 | ||
uses: actions/upload-artifact@v2-preview | ||
with: | ||
name: release-outputs | ||
path: app/build/outputs.zip | ||
|
||
- name: 创建 GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: 上传渠道包(GitHub) | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: app/build/outputs/apk/github/release/com.jacknic.glut-github-release.apk | ||
asset_name: com.jacknic.glut-github-release.apk | ||
asset_content_type: application/vnd.android.package-archive | ||
|
||
- name: 上传渠道包(应用宝) | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: app/build/outputs/apk/yyb/release/com.jacknic.glut-yyb-release.apk | ||
asset_name: com.jacknic.glut-yyb-release.apk | ||
asset_content_type: application/vnd.android.package-archive | ||
|
||
- name: 上传渠道包(demo) | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: app/build/outputs/apk/demo/release/com.jacknic.glut-demo-release.apk | ||
asset_name: com.jacknic.glut-demo-release.apk | ||
asset_content_type: application/vnd.android.package-archive |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 单元测试流程 | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
|
||
- name: 检出项目 | ||
uses: actions/checkout@v1 | ||
|
||
- name: 使用JDK 1.8 环境 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: 执行单元测试 | ||
run: | | ||
chmod +x ./gradlew | ||
./gradlew test | ||
- name: 上传产出物(测试报告) | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: test-artifact | ||
path: app/build/reports |