feat: uses toml
This commit is contained in:
parent
ff0dba26a5
commit
0be270ab5a
7
.github/workflows/get_info.py
vendored
7
.github/workflows/get_info.py
vendored
@ -13,8 +13,9 @@ print(os.listdir('.'))
|
||||
sys.path.append(os.path.abspath(os.curdir))
|
||||
print(sys.path)
|
||||
|
||||
from Difficult_Rocket import DR_runtime
|
||||
if os.path.abspath(os.curdir) in sys.path:
|
||||
from Difficult_Rocket import DR_runtime
|
||||
|
||||
print(f'DR_version={DR_runtime.DR_version}')
|
||||
os.system(f'echo "DR_version={DR_runtime.DR_version}" >> $GITHUB_OUTPUT')
|
||||
print(f'DR_version={DR_runtime.DR_version}')
|
||||
os.system(f'echo "DR_version={DR_runtime.DR_version}" >> $GITHUB_OUTPUT')
|
||||
|
||||
|
26
.github/workflows/nuitka.yml
vendored
26
.github/workflows/nuitka.yml
vendored
@ -31,15 +31,15 @@ jobs:
|
||||
# 获取短 sha
|
||||
- name: Get short commit sha
|
||||
id: get_short_sha
|
||||
shell: bash
|
||||
shell: pwsh
|
||||
run: |
|
||||
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7)
|
||||
echo "short_sha=$short_sha" >> $GITHUB_OUTPUT
|
||||
echo $GITHUB_OUTPUT
|
||||
# $short_sha = Write-Output $`{GITHUB_SHA`}
|
||||
# $short_sha = $short_sha.substring(1,7)
|
||||
# Write-Output $short_sha
|
||||
# Write-Output "short_sha=$short_sha" >> $GITHUB_OUTPUT
|
||||
# short_sha=$(echo ${GITHUB_SHA} | cut -c1-7)
|
||||
# echo "short_sha=$short_sha" >> $GITHUB_OUTPUT
|
||||
# echo $GITHUB_OUTPUT
|
||||
$short_sha = Write-Output $`{GITHUB_SHA`}
|
||||
$short_sha = $short_sha.substring(1,7)
|
||||
Write-Output $short_sha
|
||||
Write-Output "short_sha=$short_sha" >> $env:GITHUB_ENV
|
||||
|
||||
|
||||
# 安装 Python
|
||||
@ -65,6 +65,14 @@ jobs:
|
||||
shell: bash
|
||||
run: python .github/workflows/get_info.py
|
||||
|
||||
- name: Get DR toml info
|
||||
id: toml_info
|
||||
shell: pwsh
|
||||
uses: SebRollen/toml-action@v1.0.1
|
||||
with:
|
||||
file: 'configs/main.toml'
|
||||
field: 'runtime.version'
|
||||
|
||||
# 还是得我自己写脚本
|
||||
- name: Build on Windows
|
||||
if: runner.os == 'Windows'
|
||||
@ -110,6 +118,6 @@ jobs:
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Difficult-Rocket_v${{steps.DR_info.outputs.DR_version}}-${{runner.os}}_${{matrix.python-version}}-Build.${{github.run_number}}+${{steps.get_short_sha.outputs.short_sha}}
|
||||
name: Difficult-Rocket_v${{steps.toml_info.outputs.value}}-${{runner.os}}_${{matrix.python-version}}-Build.${{github.run_number}}+${{steps.get_short_sha.outputs.short_sha}}
|
||||
path: |
|
||||
build/*.zip
|
Loading…
Reference in New Issue
Block a user