diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c57cb32..7c40894 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-name: Auto build and delay
+name: build
on:
push:
@@ -59,47 +59,33 @@ jobs:
if [[ ${{ steps.config.outputs.need_create_release }} != 'true' ]];then
path="$GITHUB_WORKSPACE/app/build/outputs/apk/debug"
fi
- files=$(ls $path)
- for f in $files
- do
- if [[ $f == *"apk" ]]; then
- file=$f
- echo "[$(date -u -d '+8 hour' '+%Y.%m.%d %H:%M:%S')] 文件:$file"
- break
- fi
- done
- echo ::set-output name=file_name::"$file"
- echo ::set-output name=file_path::"$path/$file"
- - name: Upload App To Artifact
- uses: actions/upload-artifact@v2
- with:
- name: FYReader-apk
- path: ${{ steps.get_path.outputs.file_path }}
- - name: Upload App To Lanzou
+ echo ::set-output name=file_path::"$path"
+ - name: Upload Lanzou
run: |
echo "上传APP至蓝奏云"
- python3 $GITHUB_WORKSPACE/keystore/scripts/lzy.py "${{ steps.get_path.outputs.file_path }}" "${{ steps.config.outputs.lanzou_folder_id }}"
- echo "[$(date -u -d '+8 hour' '+%Y.%m.%d %H:%M:%S')] 分享链接: ${{ steps.config.outputs.lanzou_share_url }}"
- - name: Create Release
- id: create_release
+ tag_name=${{ steps.config.outputs.version_name }}
+ if [ ${{ steps.config.outputs.need_create_release }} != 'true' -a ${{ github.ref }} != 'refs/heads/master' ];then
+ gitHead=$(git rev-parse --short HEAD)
+ tag_name=${{ steps.config.outputs.version_name }}-$gitHead
+ fi
+ python3 $GITHUB_WORKSPACE/keystore/scripts/lzy.py "${{ steps.get_path.outputs.file_path }}/风月读书$tag_name.apk" "${{ steps.config.outputs.lanzou_folder_id }}" "$tag_name"
+ # 发布正式版
+ - name: Release
if: ${{ steps.config.outputs.need_create_release == 'true' && github.ref == 'refs/heads/master' }}
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TZ: Asia/Shanghai
+ uses: softprops/action-gh-release@v1
with:
- tag_name: ${{ steps.config.outputs.version_name }}
- release_name: FYReader_${{ steps.config.outputs.version_name }}
- body_path: ${{ github.workspace }}/app/release.md
+ body_path: ./app/release.md
+ prerelease: false
draft: false
- - name: Upload Release Asset
- id: upload_release_asset
- if: ${{ steps.config.outputs.need_create_release == 'true' && steps.create_release.outputs.upload_url }}
- uses: actions/upload-release-asset@v1
+ tag_name: ${{ steps.config.outputs.version_name }}
+ name: FYReader_${{ steps.config.outputs.version_name }}
+ files: |
+ ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # 上传Artifact
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: ${{ steps.get_path.outputs.file_path }}
- asset_name: FYReader_${{ steps.config.outputs.version_name }}.apk
- asset_content_type: application/vnd.android.package-archive
\ No newline at end of file
+ name: app
+ path: ${{ steps.get_path.outputs.file_path }}/风月读书*.apk
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 1d39116..796ad65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,10 +29,3 @@ keystore
*.zip
*.tar.gz
*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-<<<<<<< HEAD
->>>>>>> 2c33f0b33a0411efd93a4810de5061a473835ff5
-=======
->>>>>>> eee131cea39d27218fc7d1c3d641d617d377af42
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index d16e683..6f1407f 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -14,6 +14,7 @@
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5f8ba6c..ded8613 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,6 +3,8 @@