Browse Source

Merge branch 'release/0.3.0'

liuyuqi-dellpc 2 months ago
parent
commit
b407b3970b
3 changed files with 80 additions and 1 deletions
  1. 64 0
      .github/workflows/build.yml
  2. 1 0
      .gitignore
  3. 15 1
      README.md

+ 64 - 0
.github/workflows/build.yml

@@ -0,0 +1,64 @@
+name: Publish Installers
+
+on:
+  workflow_dispatch: ~
+  push:
+    branches: [master]
+    tags: [v*]
+
+jobs:
+  build:
+    name: Build ${{ matrix.os }} Package
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix: 
+        os: [windows-2019, ubuntu-20.04]
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v4
+
+      - name: Set Release Version
+        id: get_version
+        shell: bash
+        run: |
+          echo "::set-output name=hash::$(git rev-parse --short HEAD)"
+          echo "::set-output name=date::$(date +%Y%m%d)"
+          echo "::set-output name=url::$(git remote get-url origin)"
+          
+      - name: Set Up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.9'
+          cache: pip
+          cache-dependency-path: '**/requirements*.txt'
+
+      - name: Install Dependencies
+        run: |
+          python -m pip install --upgrade pip wheel setuptools
+          pip install -r requirements.txt
+          python -m pip install pyinstaller
+
+      - name: Build Package
+        run: |
+          python -m PyInstaller -F -c  -i favicon.ico --name crawl_sse main.py
+
+      - name: Update to ali oss
+        uses: yizhoumo/setup-ossutil@v1
+        with:
+          endpoint: oss-cn-qingdao.aliyuncs.com
+          access-key-id: ${{ secrets.OSS_KEY_ID }}
+          access-key-secret: ${{ secrets.OSS_KEY_SECRET }}
+          
+      - name: cp files to aliyun
+        run: |
+          ossutil cp -r dist/ oss://yoqi-software/develop/crawl_sse/${{ steps.get_version.outputs.date }}-${{ steps.get_version.outputs.hash }}/
+      
+      - uses: leafney/dingtalk-action@v1
+        if: always()
+        env:
+          DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }}
+        with:
+          msgtype: link
+          title: 'crawl_sse build success'
+          text: 'please download from aliyun oss. [git.yoqi.me]'
+          msg_url: '${{ steps.get_version.outputs.url }}'

+ 1 - 0
.gitignore

@@ -2,3 +2,4 @@
 *.pyc
 *.pdf
 *.xlsx
+data/**/*.html

+ 15 - 1
README.md

@@ -6,6 +6,16 @@
 
 下载上市公司数据:
 
+[![Version](https://img.shields.io/badge/version-v1.1.0-brightgreen)](https://git.yoqi.me/lyq/crawl_sse)
+[![Python](https://img.shields.io/badge/Python-3.11.4-brightgreen?style=plastic)](https://git.yoqi.me/lyq/crawl_sse)
+
+[English](./README.md) 
+
+上市公司数据分析
+
+## Develop
+
+下载上市公司数据:
 ```
 virtualenv .venv
 source .venv/bin/activate
@@ -27,4 +37,8 @@ python main.py nianbao
 # 下载年报
 python main.py nianbao --download
 
-```
+```
+
+## License
+
+## Reference