C M D 害 人

This commit is contained in:
2021-08-09 08:16:11 +08:00
parent b3ef90237f
commit e28894549c
2 changed files with 3 additions and 12 deletions

View File

@@ -10,20 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: GetCommitID
#这里找不到好办法用git获取CommitID就直接截取了
#如果有好办法的话欢迎pr
#之前尝试用的:
#for /F %%i in ('git rev-parse --short "${{ GITHUB.SHA }}"') do (set CommitID=%%i)
#失败原因:
#直接powershell运行报错使用bat运行会获取不到${{ GITHUB.SHA }}
run: |
$CommitID="${{ GITHUB.SHA }}".Substring(0,7)
echo $CommitID > test.txt
echo "CommitID=$CommitID"
$CommitID=git rev-parse --short "${{ GITHUB.SHA }}"
echo "CommitID=$CommitID" >> $env:GITHUB_ENV
- name: GetVersion
run: |
.\.github\workflows\getVersion.bat
$Version=python .github/workflows/getVersion.py
echo "Version=$Version" >> $env:GITHUB_ENV
- name: Download love
run: |
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip

View File

@@ -1,2 +0,0 @@
for /F %%i in ('python .github/workflows/getVersion.py') do (set Version=%%i)
powershell -Command echo "Version=%Version%" >> $env:GITHUB_ENV