Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
chore: 更新测试脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
asforest committed Jan 23, 2022
1 parent 87fe369 commit 8f762f0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version_name:
description: 'a version name'
required: false
default: '0.0.0'

jobs:
build:
Expand All @@ -19,6 +25,8 @@ jobs:
key: ${{ hashFiles('**/requirements.txt') }}

- name: Build
env:
PROJECT_VERSION: ${{ github.event.inputs.version_name }}
run: |
tzutil /s "China Standard Time"
python -m pip install wheel setuptools virtualenv
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
version_name:
description: 'a version name'
required: false
default: 'test-version'

jobs:
build:
Expand All @@ -19,6 +24,8 @@ jobs:
key: ${{ hashFiles('**/requirements.txt') }}

- name: Build
env:
PROJECT_VERSION: ${{ github.event.inputs.version_name }}
run: |
tzutil /s "China Standard Time"
python -m pip install wheel setuptools virtualenv
Expand Down
3 changes: 2 additions & 1 deletion build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ def get_git_sha():
return os.getenv('GITHUB_SHA', '')

# 生成版本号文件
import os
import json
import time

metadata_file = 'meta.json'
version_text = get_git_tag('0.0.0')
version_text = get_git_tag(os.getenv('PROJECT_VERSION', '0.0.0'))
commit_sha = get_git_sha()
compile_time = time.strftime("%Y-%m-%d %H:%M-%S %z")

Expand Down

0 comments on commit 8f762f0

Please sign in to comment.