fix: using powershell on windows (#434)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
parent
344694031b
commit
3f7749ae66
|
@ -138,7 +138,7 @@ jobs:
|
|||
- name: Upload to Draft
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/master' && runner.os != 'Windows'
|
||||
run: |
|
||||
cd console/atest-desktop
|
||||
export TAG=$(gh release list -L 1 | awk '{print $4}')
|
||||
|
@ -146,10 +146,26 @@ jobs:
|
|||
jq '.version = env.TAG' package.json > package.json.new && mv package.json.new package.json
|
||||
npm i
|
||||
npm run publish
|
||||
- name: Upload to Draft on Windows
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
|
||||
if: github.ref == 'refs/heads/master' && runner.os == 'Windows'
|
||||
run: |
|
||||
cd console/atest-desktop
|
||||
$TAG = (gh release list -L 1).Split(' ')[0]
|
||||
if ($TAG -like "v*") {
|
||||
$TAG = $TAG -replace "^v", ""
|
||||
}
|
||||
Set-Content -Path "env:TAG" -Value "$TAG"
|
||||
jq '.version = env.TAG' package.json > package.json.new
|
||||
rm package.json
|
||||
Rename-Item -Path package.json.new -NewName package.json
|
||||
npm i
|
||||
npm run publish
|
||||
- name: Upload
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
|
||||
if: github.ref != 'refs/heads/master'
|
||||
if: github.ref != 'refs/heads/master' && runner.os != 'Windows'
|
||||
run: |
|
||||
cd console/atest-desktop
|
||||
export TAG=$(git describe --tags --abbrev=0)
|
||||
|
@ -157,6 +173,22 @@ jobs:
|
|||
jq '.version = env.TAG' package.json > package.json.new && mv package.json.new package.json
|
||||
npm i
|
||||
npm run publish
|
||||
- name: Upload on Windows
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
|
||||
if: github.ref != 'refs/heads/master' && runner.os == 'Windows'
|
||||
run: |
|
||||
cd console/atest-desktop
|
||||
$TAG = git describe --tags --abbrev=0
|
||||
if ($TAG -like "v*") {
|
||||
$TAG = $TAG -replace "^v", ""
|
||||
}
|
||||
Set-Content -Path "env:TAG" -Value "$TAG"
|
||||
jq '.version = env.TAG' package.json > package.json.new
|
||||
rm package.json
|
||||
Rename-Item -Path package.json.new -NewName package.json
|
||||
npm i
|
||||
npm run publish
|
||||
|
||||
# image-operator:
|
||||
# runs-on: ubuntu-20.04
|
||||
|
|
Loading…
Reference in New Issue